TinyButStrong - the PHP Template Engine
Categories > TinyButStrong general >

user onshow inside another onshow

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: Unni R
Date: 2014-03-10
Time: 15:23

user onshow inside another onshow

Hello,

Can i use  onshow place holder in side another onshow place holder?

For eg:


In  PHP :
If ($a==1){
$countryfolder='US';
}else{
$countryfolder='UK';
}


$Cookie_Notification_Message=" <p><strong>Cookies are used on this site.</strong> Continue to browse if you are happy with this or alternatively <a href="[onshow.countryfolder]Privacy-statement.htm">click here for more info.</a></p>";

In TEMPLATE:
[onshow.Cookie_Notification_Message;htmlconv=no;protect=no;noerr]

In Result:

[onshow.countryfolder] place holder is not replaced by the corresponding value (US or UK)

Please help....Thanks

Unni
By: Sarah
Date: 2014-03-10
Time: 18:45

Re: user onshow inside another onshow

You cannot nest one onshow inside of another. Try using an earlier merge for the nested item (onload or var).