[solved]Is it possible place an smarty tag into another smarty tag ?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
amin30b
Forum Members
Forum Members
Posts: 146
Joined: Sat Mar 31, 2007 8:02 am

[solved]Is it possible place an smarty tag into another smarty tag ?

Post by amin30b »

Hi
While I installed TruetypeText module it was a good idea for me
if I could display my pages title with using of TruetypeText module .
By default , pages title related tag is {title} .
So I placed this tag instead of it :
{cms_module module="TruetypeText" style="bala" text="{title}"}
I know it`s a silly tag definition but I just tried out my chance .
However I don`t know is there any solution for it or not !
Last edited by amin30b on Sun Sep 09, 2007 3:39 pm, edited 1 time in total.
alby

Re: Is it possible place an smarty tag into another smarty tag ?

Post by alby »

amin30b wrote: Hi
While I installed TruetypeText module it was a good idea for me
if I could display my pages title with using of TruetypeText module .
By default , pages title related tag is {title} .
So I placed this tag instead of it :
{cms_module module="TruetypeText" style="bala" text="{title}"}
I know it`s a silly tag definition but I just tried out my chance .
However I don`t know is there any solution for it or not !
Use capture function:
{capture name="title"}{title}{/capture}
{cms_module module="TruetypeText" style="bala" text="$smarty.capture.title"}
Alby
User avatar
amin30b
Forum Members
Forum Members
Posts: 146
Joined: Sat Mar 31, 2007 8:02 am

Re: Is it possible place an smarty tag into another smarty tag ?

Post by amin30b »

I used your tag but it doesn`t work truly and this error appears:
string(126) "Smarty error: [in template:20 line 116]: syntax error: $smarty. is an unknown reference (Smarty_Compiler.class.php, line 2126)"
and it shows "capture title" image instead of main title statement .
alby

Re: Is it possible place an smarty tag into another smarty tag ?

Post by alby »

amin30b wrote: I used your tag but it doesn`t work truly and this error appears:
string(126) "Smarty error: [in template:20 line 116]: syntax error: $smarty. is an unknown reference (Smarty_Compiler.class.php, line 2126)"
and it shows "capture title" image instead of main title statement .
Strange, have you insert exactly without space?
Try with:
{capture name="title" assign="titlepage"}{title}{/capture}
{cms_module module="TruetypeText" style="bala" text="{$titlepage}"}

Alby
User avatar
amin30b
Forum Members
Forum Members
Posts: 146
Joined: Sat Mar 31, 2007 8:02 am

Re: Is it possible place an smarty tag into another smarty tag ?

Post by amin30b »

Thanks Alby  ;)
Now it works but this is the correct tag :

Code: Select all

{capture name="title" assign="titlepage"}{title}{/capture}
{cms_module module="TruetypeText" style="bala2" text=$titlepage}
alby

Re: Is it possible place an smarty tag into another smarty tag ?

Post by alby »

amin30b wrote: Thanks Alby  ;)
Now it works but this is the correct tag :

Code: Select all

{capture name="title" assign="titlepage"}{title}{/capture}
{cms_module module="TruetypeText" style="bala2" text=$titlepage}
Yes, my mistake  ::)

Alby
Post Reply

Return to “Modules/Add-Ons”