Expose custom variable from decorator to the view

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
heural
Posts: 58
Joined: 09 Jun 2022, 07:55

Expose custom variable from decorator to the view

Post by heural » 12 May 2023, 09:05

Hi Aimeos-Team,

how can I add custom var´s from an Frontend-Controller-Decorator class to the desired view?

Maybe from an Controller/Frontend/Basket-Decorator to the view (template) "client/html/basket/standard/body"?

Thank you!

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

Re: Expose custom variable from decorator to the view

Post by aimeos » 14 May 2023, 10:28

You can't, because a frontend decorator doesn't have access to the view that is used in the HTML client. You can create a decorator for the HTML client that uses the frontend controller to retrieve data and assign that to the view.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

heural
Posts: 58
Joined: 09 Jun 2022, 07:55

Re: Expose custom variable from decorator to the view

Post by heural » 23 May 2023, 07:14

Thank you, this was helpful!

Post Reply