Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "component" layout path to renderer #1

Closed
wants to merge 1 commit into from
Closed

Conversation

elkuku
Copy link

@elkuku elkuku commented May 11, 2013

Hey,
I really would love to see the "component" layout files inside the components directory... unless there is a reason against it.
Now, I'm not quite sure about the implementation, so this is just one possible approach ;)

@elkuku
Copy link
Author

elkuku commented May 11, 2013

The Travis build failed ? 😃

@b2z
Copy link
Owner

b2z commented May 13, 2013

@elkuku sry, I did not see your PR earlier. I like the idea :) Need to take a closer look, may be later today.
P.S.
Sry I am also not familiar with Travis CI and builds... Not so experienced in this area :(

@b2z
Copy link
Owner

b2z commented May 13, 2013

@elkuku since Twig is supporting different templates locations and currently this is implemented as themes, what I am thinking of is to make setTemplateLocations() method as a public method and remove $this->config['themes_base_dir'] from it to the constructor. This will allow to register different template locations using renderer's common interface and we will not be coupled to themes_base_dir. Also I am thinking to drop mandatory themes support. So many ideas in my head, will move them into the code after my working day will be over :)

@elkuku
Copy link
Author

elkuku commented May 13, 2013

I think we might just expose the Twig_Loader_Filesystem's addPath() method from within the renderer, but I'llI leave the implementation to you ;)
Important thing is providing a way to register one or more paths where layouts can be found to the renderer.
Maybe we get to a point where we can render more than one "component" per page call ;)

Other (unrelated) stuff that comes to my mind - the usage of Twigs dump() function by either checking our JDEBUG constant or adding some options to the config.json file would be really cool for a Twig noob like me ;)

EDIT: Oh - the Travis stuff is completely my fault - don't worry (sry for the spam) :P

@b2z
Copy link
Owner

b2z commented May 13, 2013

@elkuku checkout my latest commit, I've added support for additional paths.

@b2z
Copy link
Owner

b2z commented May 15, 2013

PR with the feature request was issued, so I am closing this ;)

@b2z b2z closed this May 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants