Page 1 of 1

Smarty 'title' tag into another smarty tag? [solved]

Posted: Tue Aug 07, 2007 3:29 pm
by Bartm85
Hi,

I want to put a smarty tag which is defined by cmsms into another smarty tag, also defined by cmsms.
My goal is to achieve something like this:

Code: Select all

{cms_selflink page='contactform' urlparam="&subject={title}" text='Contact us about this subject'}
A link to the contact form with an additional parameter 'subject', that gets the value of the title of the page where it was called from.

This probably has a pretty simple answer, but I can't find it on the web.

Many thanks in advance,

Bart

Re: Smarty 'title' tag into another smarty tag?

Posted: Tue Aug 07, 2007 3:32 pm
by calguy1000
try this:

Code: Select all

{capture assign='mytitle'}{title}{/capture}
{cms_selflink page='contactform' urlparam="&subject=$mytitle" text='Contact us about this subject'}

Re: Smarty 'title' tag into another smarty tag?

Posted: Tue Aug 07, 2007 3:34 pm
by Bartm85
That worked perfectly! Thanks!

Re: Smarty 'title' tag into another smarty tag? [solved]

Posted: Tue Sep 14, 2010 8:58 am
by marsselink
At the moment i have the same problem, but the solution didn't worked for me.
I want to use this function with the simpleslider module.
The code i use in the template is:

Code: Select all

{capture assign='mytitle'}{title}{/capture}
{cms_module module='SimpleSlider' show='$mytitle'}
Unfortunately it doesn't work i tried several other solutions but didn't worked.
Anyone who know what the problem is with the current code?
Already thanks in advantage!

Re: Smarty 'title' tag into another smarty tag? [solved]

Posted: Tue Sep 14, 2010 9:04 am
by RonnyK
Did you try without the single-quotes around the variable?

{cms_module module='SimpleSlider' show=$mytitle}

Ronny

Re: Smarty 'title' tag into another smarty tag? [solved]

Posted: Tue Sep 14, 2010 9:11 am
by marsselink
Thanks Ronny for your fast reply.
I tried also without the single quotes but this didn't worked either.