On 11/21/10 8:35 PM, Lukas Kahwe Smith wrote:

On 21.11.2010, at 20:23, Fabien Potencier wrote:


On 11/21/10 7:28 PM, Bulat Shakirzyanov wrote:
Lukas,

To make it work you will have to create controllers (controller
class actions) for partial responses.

Assume you have a page with "Welcome, Guest" in the top right
corner. You want that part to be dynamic and the rest of the page
- static, since your home page never changes for example. Then
you create PageController::welcomeAction($userId = null) - which
renders only that piece. and inside your main template, assuming
you use php - $view['actions']->render('MyBundle:Page:welcome',
array('userId' => $user->getId() ?: null)); that way if there is
an esi proxy requesting that page - that piece is transformed
into and ESI tag, otherwise - its rendered inline I might have
specified the wrong helper name, but other than that it should be
correct.

Fabien?

correct if you add 'standalone' =>  true


ok .. so i think what isnt clear to me yet is what is the url set for
the given ESI include: does using ESI then generate some special
route for just "MyBundle:Page:welcome" going by the above example
that is requested if this ESI block ever does stale?

aka even of "MyBundle:Page:welcome" is usually always embedded on
other pages and there isnt any explicit route to just get
"MyBundle:Page:welcome", using ESI such an implicit route is
generated in order to be able to fetch just "MyBundle:Page:welcome".

MyBundle:Page:welcome is a normal URL; there is nothing special. It can
have its own URL or an "internal" one only depending on the security
access control you configure for it.

The reverse proxy calls this page when it expires.

Fabien

regards, Lukas Kahwe Smith [email protected]




--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to