Wednesday, March 15, 2017

octoberCMS | share the code between layouts

enter image description here

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}



via Ivan Dunets

Advertisement