eZ Community » Forums » Developer » include template from another...
expandshrink

include template from another extension ezpublish

include template from another extension ezpublish

Friday 26 February 2016 6:48:51 am - 1 reply

In my current extension template i need to include template from another extension.If i write 
    {include uri="design:article/full.tpl"}
it will search in my current extension.

How can i direct it to other extension? According to doc there is a `name` parameter. What should be value of name?

https://doc.ez.no/eZ-Publish/Tech...late-functions/Miscellaneous/include

Modified on Friday 26 February 2016 6:49:27 am by akhtar zaman

Friday 26 February 2016 11:32:23 am

if you have an extension with a template inside

my_extension
+ design
++ standard
+++ templates
++++ my_folder
+++++ my_tpl.tpl

and you define your extension 'my_extension' in settings/design.ini.append.php as a design extension

you can use this template

  {include uri="design:my_folder/my_tpl.tpl"}

The design: searches alle design folder from kernel and extensions and looks for the tempate (templates could override)

I think you can inlcude a template directly, too

  {include uri="my_extension/design/standard/templates/my_folder/my_tpl.tpl"}

but i did not try this notation.

The name Parameter is for a template scope. If you use the name="mynamespace" al tpl variables in the inlcuded template are in this scope,

if not the tpl variable are in the same scope of the caller template!!!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from