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

$themes setter option for ThemeManager #2005

Closed nadar closed 3 years ago

nadar commented 4 years ago

An option to set themes which are then merged with the composer.json based themes, but can be activated in the cms.

There is a $themes read only property, why not setter method?

For development purposes it would be nice to set a theme path without theme.json or at least to provided the path to the theme.json:

'themeManager' => [
'themes' => [
    ['name' => 'Theme Number 1', 'path' => '.../../....']
]
];
boehsermoe commented 4 years ago

What would be the benefit of it? A theme directory is needed anyway, where the develop can place a theme.json easily too. With more possibilities to define a theme its more complicate and also makes harder for debugging.

I think currently it should be possible to define a external theme from the composer.json of the app project 🤔

nadar commented 4 years ago

I think currently it should be possible to define a external theme from the composer.json of the app project 🤔

Would be great indeed, so we should extend the docs.

I was developing a theme by myself and came intro struggle testing it without "tweaking" stuff. So i thought it would be nice to directly set the full theme config in the themeManager component, without composer.