Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Template subdirs #1324

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

Merged
merged 1 commit into from
Jun 17, 2012
Merged

Template subdirs #1324

merged 1 commit into from
Jun 17, 2012

Conversation

mdpatrick
Copy link
Contributor

Observed that for whatever reason the AcmeHelloBundle:Blah:Blah.html.twig syntax seems to not lend itself to people realizing they can still use a subdirectory even beneath "views/Blah" level.

See "cons" here:
http://www.reddit.com/r/PHP/comments/sx3fk/symfony2_experiences/c4hvwae


$templating = $this->get('templating');
$content = $templating->render('AcmeHelloBundle:Hello:index.html.twig', array('name' => $name));
$content = $templating->render('AcmeHelloBundle:Hello/Greetings:index.html.twig', array('name' => $name));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not having them both? Give first a simple example and make it more complex and the second one.
I think it is better to place it in a note.

@weaverryan
Copy link
Member

I'm luke-warm on this idea. I do want people to know that this is certainly possible, but it's not something that I actually want to recommend that people do - it's an extra level of organization that is often unnecessary and makes your code more difficult to go through.

So, perhaps we can modify things to be a little side-note and make it clear that it's not necessarily recommended, but certainly possible.

Thanks!

@mdpatrick
Copy link
Contributor Author

Amended the commit, should be a little closer now, I think.

weaverryan added a commit that referenced this pull request Jun 17, 2012
@weaverryan weaverryan merged commit 792bf52 into symfony:2.0 Jun 17, 2012
@weaverryan
Copy link
Member

Love it - thanks Dan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.