Why won't lang entry show in sub-template?
hansolo Offline
Junior Member
**
Posts: 22
Joined: Sep 2015
Post: #1
Why won't lang entry show in sub-template?
Hi All,

I'm still working on my modification using xthreads. I am adding a new button to the postbit.

The new button template is called 'cheese_postbit_A' and looks like this:

Code:
<a href="#" title="{$lang->cheese_postbit_A}" class="cheese_postbit_A"><span>{$lang->cheese_postbit_button_A}</span></a>


All of those lang entries are in global.lang.php, the same as the other "button_" entries.

I have a plugin which populates the post member. It executes the following via the postbit hook:

Code:
eval("\$post['button_cheese_A'] = \"".$templates->get("cheese_postbit_A")."\";");


$post['button_cheese_A'] is then used in the parent 'postbit_classic' template to show the button.

The problem is: the button shows, but the text is blank. If I manually change the <span> to contain "TEST", then it shows the text "TEST". So the lang member is not being read.

What am I missing?

Cheers!

(This post was last modified: 10-10-2015 09:24 PM by hansolo.)
10-10-2015 09:22 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Why won't lang entry show in sub-template? - hansolo - 10-10-2015 09:22 PM

 Standard Tools
Forum Jump: