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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Bartm85

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

Post 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
Last edited by Bartm85 on Tue Aug 07, 2007 3:34 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

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

Post 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'}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Bartm85

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

Post by Bartm85 »

That worked perfectly! Thanks!
marsselink
New Member
New Member
Posts: 5
Joined: Tue Feb 17, 2009 10:08 am

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

Post 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!
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

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

Post by RonnyK »

Did you try without the single-quotes around the variable?

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

Ronny
marsselink
New Member
New Member
Posts: 5
Joined: Tue Feb 17, 2009 10:08 am

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

Post by marsselink »

Thanks Ronny for your fast reply.
I tried also without the single quotes but this didn't worked either.
Locked

Return to “CMSMS Core”