CMS Linker (cms_selflink) valid link checking?

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Sphinx
Forum Members
Forum Members
Posts: 12
Joined: Wed Nov 05, 2008 11:39 am

CMS Linker (cms_selflink) valid link checking?

Post by Sphinx »

Hi,

I'm trying to figure out how to make cms_selflink check if the page it links to is active (published) - if its not, I want the linker to skip the href setup so the link doesn't take the user to a 404.

Maybe its already possible to configure this, but I haven't found any way to do it.

Any ideas on where I should start and how this is best achieved?

TIA,

Michael
kendo451

Re: CMS Linker (cms_selflink) valid link checking?

Post by kendo451 »

Have you actually been sent to a 404?  Normally if the page is not there, the {cms_selflink} tag outputs nothing, so there will be no link at all.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CMS Linker (cms_selflink) valid link checking?

Post by calguy1000 »

{cms_selflink href='home' assign='foo'}{if $foo != ''}something{/if}
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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CMS Linker (cms_selflink) valid link checking?

Post by calguy1000 »

cms_selflink is an abomination, and should be nuked, re-written, abolished, burned at the stake...
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.
kendo451

Re: CMS Linker (cms_selflink) valid link checking?

Post by kendo451 »

:D

Got a laugh from that.
Post Reply

Return to “Developers Discussion”