Cassiano Valle Tartari
MSc. Computer Engineer
Tel: +55.48.84474818
Email: fal...@cassianotartari.eng.br
Site: http://www.cassianotartari.eng.br
At this point you should have a page name realty_show in the sonata backend, you can assign a template to this page .
That's it. ..
--
You received this message because you are subscribed to the Google Groups "sonata-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonata-users...@googlegroups.com.
To post to this group, send email to sonata...@googlegroups.com.
Visit this group at http://groups.google.com/group/sonata-users.
For more options, visit https://groups.google.com/groups/opt_out.
#routing.yml
company_view_entity:
path: /entity/{code}
defaults:
_controller: CompanyMyBundle:Entity:view
/**
* @throws NotFoundHttpException
*
* @param $permalink
*
* @return Response
*/
public function viewAction($code)
{
$entity = $this->getDoctrine()->getRepository('CompanyMyBundle:Entity')->find($code);
if (!$imovel) {
throw new NotFoundHttpException('Not found');
}
//logic
return $this->render('CompanyMyBundle:Entity:view.html.twig', array(
'entity' => $entity ));
}
{# Company/MyBundle/Resources/views/Entity/view.html.twig #}
{{ dump(entity) }}
Cassiano Valle Tartari
MSc. Computer Engineer
Tel: +55.48.84474818
Email: fal...@cassianotartari.eng.br
Site: http://www.cassianotartari.eng.br
You can now write a cookbook entry for the page bundle ...
--
Thomas Rabaix
http://rabaix.net - http://sonata-project.org
Cassiano Valle Tartari
MSc. Computer Engineer
Tel: +55.48.84474818
Email: fal...@cassianotartari.eng.br
Site: http://www.cassianotartari.eng.br
class ShopController extends Controller
{
/**
* @param \Symfony\Component\HttpFoundation\Request $request
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function viewAction (Request $request) {
$this->render('SonataTestBundle:Shop:view.html.twig');
}
}
My View:
{% extends '::empty.html.twig' %}
{% block page %}
<h2>foo</h2>
{% endblock %}
<route id="sonata_test_view" pattern="/bestellen">
<default key="_controller">SonataTestBundle:Shop:view</default>
</route>
then i run
For some reason an empty Templatename is being passed.
What am i missing?