Page 1 of 1

Partials for views

Posted: 03 Mar 2015, 15:46
by garwat82
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

Re: Partials for views

Posted: 03 Mar 2015, 16:55
by aimeos
Hi Garret

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

Re: Partials for views

Posted: 03 Mar 2015, 18:15
by garwat82
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