Copy/clone a component with templates.
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- parmonov98
- Posts: 33
- Joined: 24 Sep 2020, 12:12
Copy/clone a component with templates.
I understood one thing according to the components, one component is one templates/(x subparts and partials).
that's good.
But anyway, not all of us use the same web doc structure of the same templates.
what I want is how to clone/copy a component with its separate templates/partials/subparts.
if I could do that with help of a command that would be awesome!
that's good.
But anyway, not all of us use the same web doc structure of the same templates.
what I want is how to clone/copy a component with its separate templates/partials/subparts.
if I could do that with help of a command that would be awesome!
Re: Copy/clone a component with templates.
Create a new directory below ./client/html/src/Client/Html/ for your new component (e.g. Catalog/Myown), copy&paste the Factory.php and Standard.php from the component you want to copy (e.g. Catalog/Lists) into the new directory, replace "Lists" by "Myown" and "lists" by "myown" in both files. Then, create the new templates in ./client/html/templates/catalog/myown/, i.e. at least body-standard.php. Adapt the class (Myown) and the template according to your needs.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star