javiereguiluz / easybook

Book publishing as easy as it should be (built with Symfony components)
https://easycorp.io/EasyBook
Other
754 stars 81 forks source link

Epub: Fix usage of twig namespaces when rendering templates #88

Closed magabriel closed 11 years ago

magabriel commented 11 years ago

Using namespaces when rendering templates other than the easybook standard css file @theme/style.css.twig was precluding the usage of customized templates per book or edition.

This PR removes namespaces from each call to render() in Epub2Publisher class except the one that generates the easybook css file @theme/style.css.twig, which is the only one that doesn't make sense to be overriden by the user. This lets the namespaces functionality of twig take care of choosing the right template.

Note to self: when PR https://github.com/javiereguiluz/easybook/pull/85 gets merged, a similar fix will need to be implemented for the new code.

jaywilliams commented 11 years ago

:+1: Please merge this. I just spent a an hour reading through the docs, trying to figure out why easybook wasn't pulling in my custom template.

javiereguiluz commented 11 years ago

@magabriel thanks as always for your pull request and for your error fix.