Skip to content
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

How to move custom components to custom skin folder? #195

Closed
stefahn opened this issue Oct 14, 2020 · 4 comments
Closed

How to move custom components to custom skin folder? #195

stefahn opened this issue Oct 14, 2020 · 4 comments

Comments

@stefahn
Copy link
Contributor

stefahn commented Oct 14, 2020

I have custom components that are located in the folder skins\chameleon\src\Components. When I update Chameleon those components get lost.

Therefore I would like to move them to skins\myskin\. How can I tell Chameleon to look for components in that folder - do I have to change the Namespace Skins\Chameleon\Components; ?

@WouterRademaker
Copy link
Contributor

WouterRademaker commented Oct 14, 2020

Add these lines to composer.local.json

        "autoload"   : {
               "classmap": ["skins/myskin/components"]
               }

And run composer update
It will add the folder to the list of folders that will be searched for Chameleon components and other classes.

@stefahn
Copy link
Contributor Author

stefahn commented Oct 23, 2020

Thanks a lot. That worked fine. I think we should add that to the documentation.

@stefahn
Copy link
Contributor Author

stefahn commented Feb 24, 2024

Should this still work in Chameleon 4.3.0?

In my case my custom components weren't recognized in my custom skin folder. I had to move them to skins/chameleon/src/Components to be recognized and to avoid a fatal error.

@stefahn
Copy link
Contributor Author

stefahn commented Feb 24, 2024

Sorry, for some reason it worked now after running composer update --no-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants