Yes you can, put it in apps/yourapp/templates/_myglobaltemplate.php and
include it in layout.php (or any other view/template) like this:

<html>
<head>
....
</head>
<body>
....
<?php include_partial('global/myglobaltemplate'); ?>
....
</body>
</html>

The important part is the "global" bit.

Also note though that layout.php gets run AFTER your actual view file.


2009/5/25 Stephen <stephen.j.t...@gmail.com>

>
> Hi there,
>
> I want to put a global (can be used by all modules in one application,
> but not belongs to any module) component into a layout.php. Can I do
> that?
> If I can, where should I put this component file?
>
> Regards,
> Jishi
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to