Jump to content

.tpl include in another .tpl


Sandbird

Recommended Posts

I am having a weird problem with templating.

 

I got this line in my header.tpl.

 

{include file="templates/mytheme/menu.tpl"}

 

in my menu.tpl i got this:

 

<span class="title">{$LANG.page_menu}</span>

 

and the language file has:

 

$_LANG['page_menu'] = "This is a menu";

 

But its not working....its not loading it to the header.tpl.

 

 

I am doing this way cause i couldnt figure out how to do it from php.

I could include the menu as a menu.php file using this :

 

{include_php file='templates/mytheme/menu.php'}

 

but i couldn't load the translation file then from the menu.php.

 

Either way its fine by me....php or tpl...i just want the damn thing to load a menu.tpl/php that takes variables from the language files.

 

Any help :/ ?

Link to comment
Share on other sites

I am having a weird problem with templating.

 

I got this line in my header.tpl.

 

{include file="templates/mytheme/menu.tpl"}

 

in my menu.tpl i got this:

 

<span class="title">{$LANG.page_menu}</span>

 

and the language file has:

 

$_LANG['page_menu'] = "This is a menu";

 

But its not working....its not loading it to the header.tpl.

 

 

I am doing this way cause i couldnt figure out how to do it from php.

I could include the menu as a menu.php file using this :

 

{include_php file='templates/mytheme/menu.php'}

 

but i couldn't load the translation file then from the menu.php.

 

Either way its fine by me....php or tpl...i just want the damn thing to load a menu.tpl/php that takes variables from the language files.

 

Any help :/ ?

 

 

Take a look at the v4 template files as there is a side menu in it and you will not the template is inside of the footer.tpl file but shows up on the site menu.

 

You shouldnt need to include another tpl file just place it in any of the header or footer tpl files and position it with a css statement

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated