Some problems with cms selflink in news

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
gianpiero
Forum Members
Forum Members
Posts: 221
Joined: Sun Jan 07, 2007 4:32 pm
Location: Italy

Some problems with cms selflink in news

Post by gianpiero »

Hi all

I have a problem to apply a cms selflink inside the news

The link to an internal page doesn't work, when I check the SOURCE CODE appears :

Code: Select all

<a href="{cms_selflink href='my-page-alias'}">text for calling internal link</a>
But when the news is published the link is:

Code: Select all

[code]https://mysite.org/%7Bcms_selflink%20href='my-page-alias'%7D
[/code]

and doesn't work

The cms selflinks function works on normal pages

The site is a 2.2.8 fresh installing

Is it a problem related to the summary template ? Any suggestion to check something ?

Thanks
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Some problems with cms selflink in news

Post by DIGI3 »

If you take a look at the default News templates, you'll see a comment like:

Code: Select all

{* note, for security purposes, incase News articles can come from untrused sources, we do not pass the summary or content through smarty in the default templates *}
If you trust all admins and do not allow frontend users to post News articles, you can use 'eval' to parse through Smarty, e.g.

Code: Select all

{eval var=$entry->summary}
Not getting the answer you need? CMSMS support options
gianpiero
Forum Members
Forum Members
Posts: 221
Joined: Sun Jan 07, 2007 4:32 pm
Location: Italy

Re: Some problems with cms selflink in news

Post by gianpiero »

Thank for you reply

At this moment I have , for example

Code: Select all


<div class="NewsSummarySummary">
{$entry->summary}
</div>
I have to modify

Code: Select all

<div class="NewsSummarySummary">
{eval var=$entry->summary}
</div>
is it correct ?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Some problems with cms selflink in news

Post by DIGI3 »

Yep, and the detail one as well. Anywhere it's not getting eval'd and you want it to.
Not getting the answer you need? CMSMS support options
gianpiero
Forum Members
Forum Members
Posts: 221
Joined: Sun Jan 07, 2007 4:32 pm
Location: Italy

Re: Some problems with cms selflink in news

Post by gianpiero »

working, thank you very much ;D
Locked

Return to “CMSMS Core”