On my default layout I have many AJAX handlers
, but for my project, I need to create static pages with the same layout but with different variables (fields for client)...
So as I understand I need to create different layout's that extends the partials from default layout
...
But there are some way to share the code between the layouts to prevent repeating?
Or, there are some way to create different variables on a layout to diferrent statics pages?
Ex. of var. code:
{variable name="tagline" label="Tagline" tab="Header" type="text"}{/variable}
{variable name="banner" label="Banner" tab="Header" type="mediafinder" mode="image"}{/variable}
October does not support Layout inheritance, so it is true that you need to create an entire new (separate) layout file for each structure (which can have different variables).
To reuse code, you can follow a few approaches to achieve this: