This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » General discussion » change include_partial templates path
change include_partial templates path [message #103171] Wed, 28 July 2010 11:32 Go to next message
Latios88  is currently offline Latios88
Messages: 64
Registered: February 2010
Member
Hi.
I have a footer partial that i use in all my applications of my project.

Is there any way i can create a global application partial?
I want symfony to look in shared/templates application besides the default path when searching for the partial file.


Re: change include_partial templates path [message #103173 is a reply to message #103171 ] Wed, 28 July 2010 11:38 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
The way I structure things is to have each "application" running as a plugin, and then run them all from one symfony application. Then if I want any common partials I can either put them all in a plugin module, and refer to them using `myModuleName/partialName`. Or I can put them in the application-level layout folder, and refer to them as `global/partialName`.


Remember Palestine
Re: change include_partial templates path [message #103183 is a reply to message #103173 ] Wed, 28 July 2010 12:36 Go to previous messageGo to next message
Latios88  is currently offline Latios88
Messages: 64
Registered: February 2010
Member
Interesting approach but it´s not doable at this moment of the project i am developing.

I found a solution that is using the standard php include file.
It´s not the perfect solution but it´s just the footer so i think is better than repeating all the code across all my applications.
Re: change include_partial templates path [message #103244 is a reply to message #103183 ] Thu, 29 July 2010 16:11 Go to previous message
arsenik7  is currently offline arsenik7
Messages: 53
Registered: October 2006
Location: France
Member

If you cannot create a plugin with module and partial(best solutions for me). You can create a symlink to your footer template for each new application.

[Updated on: Thu, 29 July 2010 16:12]

Previous Topic:sfDoctrineGuardPlugin: doesn't redirect to the referer page
Next Topic:How to have permission between groups and dynamics item
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software