make a new route for a template

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
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

make a new route for a template

Post by ahmed31916 » 29 Jun 2022, 09:30

Hello Aimeos,

How to make a new route nested from "profile", I have seen helper function "link", but I didn't know how to use it.

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

Re: make a new route for a template

Post by aimeos » 30 Jun 2022, 12:44

You can use the Laravel route() method in the Aimeos templates too to generate the route by name.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

Re: make a new route for a template

Post by ahmed31916 » 03 Jul 2022, 11:57

No aimeos, I didn't mean this.
I mean how to make a new route for any domain related to the "profile" for example: "profile/something" and this route should be redirects to favorite page (not to "profile" page)?

I tried to make ("profile/products"), using aimeos way, but the route redirects to index profile page (not a new page).

I tried to making a new route using laravel Route but it makes things a little complicated.

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

Re: make a new route for a template

Post by aimeos » 04 Jul 2022, 14:01

You always have to define a new route in Laravel for "/profile/something" because Aimeos uses the Laravel routing implementation. If that works, you can give the new route a name in the ./routes/web.php file (e.g. "profile-something") and use that name as parameter to the route() method.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
TEJASPARMAR
Posts: 15
Joined: 20 Mar 2024, 11:53

Re: make a new route for a template

Post by TEJASPARMAR » 14 Jun 2024, 07:58

So, we can't define a route within an extension we have created?

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

Re: make a new route for a template

Post by aimeos » 14 Jun 2024, 15:59

No, only in the Laravel application itself
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply