about creating the new components

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
mahammadareef
Posts: 54
Joined: 14 Oct 2022, 11:54

about creating the new components

Post by mahammadareef » 18 Oct 2022, 06:30

hey, i tried creating the new component by -> templates\client\html\<nameofthecomponent> and its classes and source code inside -> \src\Client\Html\<ComponentName> but its not working , i know how to crearte sub parts inside components folder and its working .

is it required to register the new components in aimeos?

can you help me with detailed steps and examples to create a new component using EXTRAUSECOMPONENT as the name of a component

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

Re: about creating the new components

Post by aimeos » 19 Oct 2022, 07:03

You have to add your new component to one of the page types in your configuration:
https://github.com/aimeos/aimeos-larave ... hp#L27-L41

Then, the body and header methods are called by the controller:
https://github.com/aimeos/aimeos-larave ... hp#L58-L62

Finally, you have to add the output of the body/header methods to the Blade template. Copy the Blade template to ./resources/views/vendor/shop/catalog/detail.blade.php and add the output of the body/header methods there:
- https://aimeos.org/docs/latest/laravel/ ... -templates
- https://github.com/aimeos/aimeos-larave ... .blade.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply