Page 1 of 1

CMS_Selflink: passing a variable into the cms_selflink

Posted: Tue Apr 11, 2017 12:04 pm
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

Re: CMS_Selflink: passing a variable into the cms_selflink

Posted: Tue Apr 11, 2017 1:02 pm
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

Re: CMS_Selflink: passing a variable into the cms_selflink

Posted: Tue Apr 11, 2017 1:16 pm
by blackrain
Awesome!! just awesome, thats issue 2 ticked off of about 150 of the little suckers!

thanks so much Jo Morg