Copy/clone a component with templates.

Help for integrating the Laravel package
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!
User avatar
parmonov98
Posts: 33
Joined: 24 Sep 2020, 12:12

Copy/clone a component with templates.

Post by parmonov98 » 12 Oct 2020, 09:47

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!

User avatar
aimeos
Administrator
Posts: 8012
Joined: 01 Jan 1970, 00:00

Re: Copy/clone a component with templates.

Post by aimeos » 13 Oct 2020, 06:43

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, Image give us a star

Post Reply