Skip to content

Commit 18e3a31

Browse files
committed
Moved templates to app
1 parent c8f5ad5 commit 18e3a31

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

book/from_flat_php_to_symfony2.rst

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -561,10 +561,7 @@ them for you. Here's the same sample application, now built in Symfony::
561561
->createQuery('SELECT p FROM AcmeBlogBundle:Post p')
562562
->execute();
563563

564-
return $this->render(
565-
'AcmeBlogBundle:Blog:list.html.php',
566-
array('posts' => $posts)
567-
);
564+
return $this->render('Blog/list.html.php', array('posts' => $posts));
568565
}
569566

570567
public function showAction($id)
@@ -579,10 +576,7 @@ them for you. Here's the same sample application, now built in Symfony::
579576
throw $this->createNotFoundException();
580577
}
581578

582-
return $this->render(
583-
'AcmeBlogBundle:Blog:show.html.php',
584-
array('post' => $post)
585-
);
579+
return $this->render('Blog/show.html.php', array('post' => $post));
586580
}
587581
}
588582

@@ -593,8 +587,8 @@ now quite a bit simpler:
593587

594588
.. code-block:: html+php
595589

596-
<!-- src/Acme/BlogBundle/Resources/views/Blog/list.html.php -->
597-
<?php $view->extend('::layout.html.php') ?>
590+
<!-- app/Resources/views/Blog/list.html.php -->
591+
<?php $view->extend('layout.html.php') ?>
598592

599593
<?php $view['slots']->set('title', 'List of Posts') ?>
600594

@@ -716,8 +710,8 @@ for example, the list template written in Twig:
716710

717711
.. code-block:: html+jinja
718712

719-
{# src/Acme/BlogBundle/Resources/views/Blog/list.html.twig #}
720-
{% extends "::layout.html.twig" %}
713+
{# app/Resources/views/Blog/list.html.twig #}
714+
{% extends "layout.html.twig" %}
721715

722716
{% block title %}List of Posts{% endblock %}
723717

0 commit comments

Comments
 (0)