[SOLVED] Getting cms_selflink to work with Gallery's Comment

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
mrenigma
Forum Members
Forum Members
Posts: 48
Joined: Fri Aug 05, 2011 3:43 pm
Location: London, United Kingdom

[SOLVED] Getting cms_selflink to work with Gallery's Comment

Post by mrenigma »

Hello all,

I am currently attempting to use the Gallery module's gallery comments system to provide banner text.

To explain, I am using the Gallery module to provide a banner on the home page and within this banner I have absolutely positioned a bit of text.

I am attempting to use the Galleries main comment box to show this bit of text.

This works great except for I cannot use smarty tags within this comment box for some reason. The cms_selflink smarty tag is showing up on the url rather than showing the url.

This is my code:

Code: Select all

<img title="Chantal - The Beauty Experts" src="uploads/images/logoText.png" alt="Chantal - The Beauty Experts" width="200" height="31" />
<p>Friendly atmosphere<br />Professional<br />Affordable treatments</p>
<a href="{cms_selflink href='contact-us'}">Book your treatments today</a>
and the resulting url is:

Code: Select all

http://mydomain.com/{cms_selflink href='contact-us'}
when it should be like this:

Code: Select all

http://mydomain.com/index.php?page=contact-us
(N.B will be adding pretty url's soon)

I am using cmsms version: 1.9.4.2 and gallery module version: 1.4.4.

Any help with this would be greatly appreciated.

Mr.Enigma
Last edited by mrenigma on Thu Sep 22, 2011 4:14 pm, edited 1 time in total.
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: Getting cms_selflink to work within Gallery's Comment

Post by Jos »

Look into your gallery-template and change

Code: Select all

{$gallerycomment}
into

Code: Select all

{eval var=$gallerycomment}
With this, all Smarty tags within $gallerycomment will be parsed.
mrenigma
Forum Members
Forum Members
Posts: 48
Joined: Fri Aug 05, 2011 3:43 pm
Location: London, United Kingdom

Re: Getting cms_selflink to work within Gallery's Comment

Post by mrenigma »

Thats exactly it, thank you! ;D
Post Reply

Return to “Modules/Add-Ons”