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: parentTheme alias resolving #2006

Closed TheMaaarc closed 4 years ago

TheMaaarc commented 4 years ago

To reproduce: Setup 2 themes and try to reference one as parentTheme with a path alias.
Example:

{
    "name": "test",
    "parentTheme": "@vendor/example/test/themes/base",
    "pathMap": [
        "views"
    ],
    "description": null
}

In the ThemeManager.php:196 it checks if $basePath is a key of $themes. The $themes array has all themes indexed by basePath. The basePath includes the whole absolute path, for example /var/www/vendor.... It would be nice to resolve aliases in $basePath to prevent having to write absolute paths into the theme config.

Maybe there is another solution or I did something wrong. In that case, a little nudge in the right direction would be appreciated. :)

nadar commented 4 years ago

@boehsermoe maybe at first place we should elaborate the function of parent Themes somewhere?

boehsermoe commented 4 years ago

This is the same problem in luyadev/luya/issues/1970 and should also fixed with luyadev/luya/pull/2002

TheMaaarc commented 4 years ago

Okay, in that case I'm gonna close this issue . :)
Thanks @boehsermoe

boehsermoe commented 4 years ago

luyadev/luya/pull/2002 is merged now