Page 1 of 1

Using cms_selflink anchorlinks with pages not in menu

Posted: Tue Jul 11, 2006 5:22 pm
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?

Re: Using cms_selflink anchorlinks with pages not in menu

Posted: Wed Jul 12, 2006 4:29 am
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...

Re: Using cms_selflink anchorlinks with pages not in menu

Posted: Wed Jul 12, 2006 4:45 pm
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.