Partials for views

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!
garwat82
Posts: 16
Joined: 18 Dec 2014, 11:07

Partials for views

Post by garwat82 » 03 Mar 2015, 15:46

Hey Aimeos folks

I'm still working on the product export from time to time and noticed that it would be nice to have partial templates just like in other template engines. The implementation as view helper was very simple and I've already created a pull request: https://github.com/aimeos/arcavias-core/pull/9

The real work arises from making this view helper available in the applications because it can't be instantiated automatically due to required constructor parameters. The PR has to be merged in advance before I can adapt the Symfony2 bundle. and the other integrations has to be adapted as well ... hoping for some help ;-)

Regards,

Garret

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

Re: Partials for views

Post by aimeos » 03 Mar 2015, 16:55

Hi Garret

Cool! I've merged your PR.
Now, what has to be changed?

garwat82
Posts: 16
Joined: 18 Dec 2014, 11:07

Re: Partials for views

Post by garwat82 » 03 Mar 2015, 18:15

In theory it isn't that much. You only have to add the "partial" helper to the view but it needs the template paths and that differ for job controller and html clients. I've solved this by passing the paths from outside and adaptes the commands and controllers accordingly. You can take my PR as reference: https://github.com/aimeos/aimeos-symfony2/pull/6

Regards,

Garret

Post Reply