Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
Daddy Posted December 12, 2024 Posted December 12, 2024 I'm not fully understanding the new theme editor. How do I modify the entire page without having to inject my code with pre-defined placements? My design is completely custom. I do not like IPS design personally. Am I missing where to access the raw template code?
Marc Posted December 12, 2024 Posted December 12, 2024 There is no longer any way to access the raw templates. This is an intentional change. Changes now should be done by ether injecting code via template hooks, CSS, or the built in theme editor. However it is worth having a play with the system. Its built in a very different manner than previous versions, and made so you can manipulate a lot more than you could on version 4, without the need to modify code
Management Matt Posted December 12, 2024 Management Posted December 12, 2024 Hi... Daddy? A phrase I've not said for about 40 years. Our ideology for version 5 was to rebuild the HTML and CSS frameworks to make them more suitable for large scale changes. If you look at the source for v5 you'll see it's much more semantic and less instructive about the design giving more scope to radically change the layout without touching the template code. For those times where you need to inject new HTML, we are populating the templates with hook points to allow you to do that. Likewise, you could leverage JS to do the same. The theme editor is a great place to start to make sweeping changes to margins, borders, spacing and colours. Removing the ability to edit templates means we can compile them once per version and store them as static files instead of relying on the database fetching them, storing them as a string in a cache and then using eval() to turn them into PHP code on each click. You get a more efficient system, and really an easier way to theme the system that survives upgrades. Marc and konon 2
Daddy Posted December 12, 2024 Author Posted December 12, 2024 6 hours ago, Matt said: Hi... Daddy? A phrase I've not said for about 40 years. Our ideology for version 5 was to rebuild the HTML and CSS frameworks to make them more suitable for large scale changes. If you look at the source for v5 you'll see it's much more semantic and less instructive about the design giving more scope to radically change the layout without touching the template code. For those times where you need to inject new HTML, we are populating the templates with hook points to allow you to do that. Likewise, you could leverage JS to do the same. The theme editor is a great place to start to make sweeping changes to margins, borders, spacing and colours. Removing the ability to edit templates means we can compile them once per version and store them as static files instead of relying on the database fetching them, storing them as a string in a cache and then using eval() to turn them into PHP code on each click. You get a more efficient system, and really an easier way to theme the system that survives upgrades. Is it possible to have the option to replace existing code instead of injecting before or after? Right now it doesn't seem possible to remove and move things around. Right now it doesn't seem possible to have a truly custom theme.
Cedric V Posted December 12, 2024 Posted December 12, 2024 A question, does this also allow custom themes to be designed as we are used to them? Or are we stuck to the default choice? I mean, if we’d change positioning of certain blocks, links, how would that go in place? Is there still room for a theme designer such as @Ehren to build several different themes like his current offering?
Recommended Posts