CMS_Selflink: passing a variable into the cms_selflink

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
blackrain
Forum Members
Forum Members
Posts: 98
Joined: Wed Feb 20, 2008 4:33 pm

CMS_Selflink: passing a variable into the cms_selflink

Post by blackrain »

I am trying to find a solution to including a variable in the href of a cms_selflink tag, like below

Code: Select all

{cms_selflink href='$specialism'}
I have tried to find a solution and tried various bits of code like:

Code: Select all

{specialism = '$item->fielddefs.specialism'}
{cms_selflink href='$specialism'}
and

Code: Select all

{assign='specialism' value='$item->fielddefs.specialism'}
{cms_selflink href='$specialism'}
any thought welcome

cheers

Mark
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: CMS_Selflink: passing a variable into the cms_selflink

Post by Jo Morg »

Code: Select all

{cms_selflink href=$specialism}
You don't want to use the quote marks for these...
http://www.smarty.net/docs/en/language. ... iables.tpl
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
blackrain
Forum Members
Forum Members
Posts: 98
Joined: Wed Feb 20, 2008 4:33 pm

Re: CMS_Selflink: passing a variable into the cms_selflink

Post by blackrain »

Awesome!! just awesome, thats issue 2 ticked off of about 150 of the little suckers!

thanks so much Jo Morg
Locked

Return to “Modules/Add-Ons”