Ivan Gretsky Posted December 9 Share Posted December 9 Good day @teppo! Another question from me) I am building a solution based on PW and Wireframe, that needs the theming functionality. That is switching theme (default views) for all the views and components. Layouts and partials probably too. Is there an easy way to achieve this with current code? Maybe a couple of hooks? I can see two ways how it could work. Put `alternative-default.php` everywhere the `default.php` files are and somehow tell Wireframe to use those prefixed files. If there is another view except the default one, the prefix should work as well. Like `alternative-json.php`. Probably an option should be available whether to fallback to defaults without the prefix or not. Create an overrides or theme folder somewhere and have somehow point Wireframe to use views from there. For my personal need the 1st approach seems to be a better one. But just maybe it is easy enough to provide possibility for both? Thanks! 1 Link to comment Share on other sites More sharing options...
teppo Posted December 12 Share Posted December 12 Hey Ivan, I'll have to get back to this later, but just wanted to say that this is an interesting idea. I've never really gone further than specifying a different layout file for different themes — so basically they've all had their own layouts, styles, etc. but still shared the same template specific views. And had a shared pool of components and partials. Both of your ideas sound feasible, but I must admint that the overrides/theme folder sounds "cleaner". It would probably be conceptually similar to WP child themes, e.g. you can override some features, but those that have not been overridden are the same as in the "parent theme" — right? That being said, the first one sounds like an easy to implement thing as well. I'll have to take a closer look at the code to be sure. 1 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted December 12 Author Share Posted December 12 1 hour ago, teppo said: you can override some features, but those that have not been overridden are the same as in the "parent theme" — right Yes. But I think there could be an option to either use parent's features or to indicate that this one is yet to be implemented in a theme (through an error or warning). Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted December 12 Author Share Posted December 12 1 hour ago, teppo said: hat being said, the first one sounds like an easy to implement thing as well. I'll have to take a closer look at the code to be sure. Great! Looking forward to see it in Wireframe! Thanks for your work and talent! Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted December 12 Author Share Posted December 12 (Deleted) Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted 22 hours ago Author Share Posted 22 hours ago @teppo, just in case you are in doubt what is that what you can gift to the world this New Year, I am quite sure the world will be delighted with the new Wireframe version with themes support)) Well, maybe not the whole world, but certainly some minor parts of it))) I do not know how do to say "happy upcoming New Year" in English or Suomi, so I'll put it here in Russian: "С наступающим!" 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