luyadev / luya

LUYA is a scalable web framework and content management system with the goal to please developers, clients and users alike.
https://luya.io
MIT License
811 stars 205 forks source link

Theme layout override mechanism #2036

Closed JohnnyMcWeed closed 3 years ago

JohnnyMcWeed commented 4 years ago

When having a main CMS layout (app/views/cmslayouts/main.php) and then inside the theme adding a main layout (app/themes/themename/views/cmslayouts/main.php) I think that this should override the app's main layout.

What steps will reproduce the problem?

Add a main cms layout to the theme (app/themes/themename/views/cmslayouts/main.php)

What is the expected result?

Overriding the default main layout (app/views/cmslayouts/main.php)

What do you get instead?

No layout update -> still using the default main layout (app/views/cmslayouts/main.php)

nadar commented 4 years ago

@boehsermoe maybe you can help here?

boehsermoe commented 4 years ago

The app views will never be override from a theme. At first it will check the app views, than theme views, than parent theme views, than that parent, ...

But especially for the cms layout you have to choose those one in the admin ui wich layout u will use for a page. Maybe this we should document it better.

It is hard to erase this step with the cms layout, because the layout ID are stored in the database. And after theme activating we would update all page layouts.

nadar commented 4 years ago

Thank you @boehsermoe for the detailed explanation. Yes, maybe some documentation would be nice regarding this.

nadar commented 3 years ago

@boehsermoe where would you document this? Can you take over this task, or should i - if yes, can you give me some informations?

i would like to close this task :-)