Reputation: 1077
Is it possible to include a global partial from a Symfony 1.4 plugin from within a module? If so, how?
I know one can include a partial from a module from a plugin, but how to include a global template?
So suppose my Symfony application has the following file structure.
/config
/lib
/apps
/backend
/config
/modules
/aModule
/config
/templates
/aTemplateWithinAModule.php
/actions
/actions.class.php
/templates
/plugins
/examplePlugin
/lib
/config
/modules
/templates
/_aGlobalPluginPartial.php
How can I include the 'aGlobalPluginPartial' from within aTemplateWithinAModule.php?
I have tried:
include_partial('global/aGlobalPluginPartial')
include_partial('examplePlugin/global/aGlobalPluginPartial')
include_partial('examplePlugin/aGlobalPluginPartial')
So far none of the above work.
My plugin is enabled in the project configuration.
Upvotes: 1
Views: 1685
Reputation: 22756
You should put it in a module.
/plugins
/examplePlugin
/lib
/config
/modules
/example
/templates
/_aGlobalPluginPartial.php
And then include it using:
include_partial('example/aGlobalPluginPartial');
Do not forget to enable the module example
in your settings.yml
file (in enabled_modules
).
Upvotes: 2