How can I change target?

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

How can I change target?

Post by parmonov98 » 10 Oct 2020, 12:38

I use HomeController. /home route path and index method with name 'homepage'.
https://i.imgur.com/klZneUO.png

https://i.imgur.com/mfZmGnC.png
where is 'shop' coming from?
What is the 'client/html/catalog/tree/url/target'?

I wanna get target of homepage(home) for the l_type on page homepage.
how can I do?

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

Re: How can I change target?

Post by aimeos » 11 Oct 2020, 08:56

First of all, please read the article how to extend Laravel to create new pages:
https://aimeos.org/docs/latest/laravel/extend/
parmonov98 wrote: 10 Oct 2020, 12:38 https://i.imgur.com/mfZmGnC.png
where is 'shop' coming from?
What is the 'client/html/catalog/tree/url/target'?
The target is the Laravel route name configured here:
https://github.com/aimeos/aimeos-larave ... #L116-L275
parmonov98 wrote: 10 Oct 2020, 12:38 I wanna get target of homepage(home) for the l_type on page homepage.
how can I do?
The simplest way is to use the Laravel "route()" function to create a URL. If you want a more configurable solution that is compliant to the other Aimeos components, you can e.g. use "$this->link('client/html/homepage/url')" and configure "client/html/homepage/url/target" to the route name you have to add to your ./routes/web.php file.

BTW: In the new 2020.10 release there's already a "catalog-home" component which may fit your needs or you can adapt it to your requirements.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply