Using cms_selflink anchorlinks with pages not in menu

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.
Post Reply
Der Rudi
Forum Members
Forum Members
Posts: 56
Joined: Wed May 17, 2006 7:42 pm

Using cms_selflink anchorlinks with pages not in menu

Post by Der Rudi »

I needed a way to use cms_selflink anchors on the same page, but with pages not in menu (like disclaimer and sitemap; these are linked via footer, not menu), but found that it was not "allowed" with the default code of function.cms_selflink.php. This is what worked for me:

Around line 204 change

Code: Select all

if ($content->Active() && $content->ShowInMenu() && $content->HasUsableLink())
into

Code: Select all

if ($content->Active() && $content->HasUsableLink())
Hope it helps somebody.

BTW why disallow this in the first place? With the Active setting one controls if one wants to use that page or not, or am I missing something?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Using cms_selflink anchorlinks with pages not in menu

Post by Dr.CSS »

you can goto the second tab when editing page and set active and not shown in menu, i've found if you set it not active in the page list it doesn't work the same as if you do it in the edit page mode...
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Using cms_selflink anchorlinks with pages not in menu

Post by Ted »

The reason that's in there is for the next/previous functionality.  There should probably be another conditional in there that checks if next/previous is to be displayed, and then check showinmenu if so.
Post Reply

Return to “CMSMS Core”