Created
July 10, 2012 23:27
-
-
Save AmauryCarrade/3086908 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# ZmCardBundle:Card:card.html.twig #} | |
{% extends 'ZmCardBundle::layout.html.twig' %} | |
{% block content %} | |
{# ... #} | |
{{ card|raw }} | |
{# ... #} | |
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# In a controller | |
$cardTemplateID = // Some logic to get this identifier | |
$infos = // Idem for user infos | |
$links = // Idem for links | |
$HTMLCard = $this->renderView('ZmCardStorageBundle:Cards:' . $cardTemplateID . '.html.twig', array( | |
'infos' => $infos, | |
'links' => $links | |
)); | |
return $this->render('ZmCardBundle:Card:card.html.twig', array( | |
'card' => $HTMLCard, | |
// ... | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment