Clarity Posted February 25, 2022 Share Posted February 25, 2022 Hello, @teppo! Can you please tell me whether it is possible or not to use Wireframe's components on templates where it is not initialized? It is needed because some parts of our site work on Wireframe while some aren't, but we need some component that will work across all templates. 1 Link to comment Share on other sites More sharing options...
teppo Posted February 27, 2022 Share Posted February 27, 2022 Hey @Clarity Some features of Wireframe do need to be initialized for components to work: paths, autoloader, etc. In practice this shouldn't make a difference: those features will be loaded behind the scenes, but you don't have to use the structure provided by Wireframe, i.e. you can render the page in whatever approach you choose. This used to require calling the initOnce() method of Wireframe manually, but I've just committed an update that should make it a bit easier: as of version 0.21.3 calling the static factory method for components (<?= Wireframe::component($component_name, array $args) ?>) will automatically initialize necessary parts of the module if it hasn't been done yet. If you don't want to use the static factory method, you'd still have to get and initialize the Wireframe module at some point. 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now