-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Themes Loading #1916
Comments
I propose to default store data in /themes as separate folder for every theme |
Yes I think Yii::$app->theming or Yii::$app->layouts (Depending on what naming we accept). In this variable we can store active theme data as object like name, author, path, version, author url. |
At first i propose to make theme like default YII. Views and other data should work on the principle of overwriting default file structure. I think the template data should be stored as JSON in the main catalog of theme like /themes/blank/theme.json |
Theme Folders contain:
How are themes installed?Is it a zip which is extracted into the themes folder (problem with namespaces!)? Or maybe installed via composer? |
In fact, it can cause us a small problem. We can try to define namespace directly from the component and then do the installer as a zip. Alternatively, we can do so that the theme was built using a composer, but as a separate package and not inside luya/vendor |
How are themes installed?I would prefer to install theme via composer (it should be enough for the first) . So we could also define the theme path as extra config in the composer.json like the block path and this will be saved in the installer.php and will be update via I doing some refactoring and will make ne PR. Maybe we should also open a new branch for this feature. What do think @nadar ? |
In general this sounds good to me, but i have some questions:
|
Active ThemeDefault theme path will be @app/themes/blank and the active theme should be defined via config
Theme managerThis component will load the active luya theme into the yii view theme component. Because this should be changeable in runtime. So the theme manager will only handle the luya specified theme config and configure the yii theme with the correct paths to handle all the view loading.
|
So you have to activate them in your config, but the themes information is somewhere assigned to an array with config from composer 👍 Yes lets create a branch with a draft PR pointing to this issue. Thanks! |
Goal
Developers (and maybe in future also Clients/Admin-Users) should be able to install a new LUYA theme for the Frontend.
Where is the data stored?
How does the mechanism work
How to setup a theme?
It should be possible to configure the theme via config, like:
So this step can later be done by module bootstrap section.
Questions
The text was updated successfully, but these errors were encountered: