Page 1 of 1

cms_selflink anchors

Posted: Mon Aug 15, 2005 10:53 am
by petert
Please extend the code for cms_selflink with the following in order to be able to use anchors:

around line 126 in lib/function.cms_selflink.php

Code: Select all

if ($url != "") {
		$result = "";
		if (isset($params['anchor'])) {
			$anchor .= '#'.$params['anchor'];
		}
		$result .= $label.'<a href="'.$url.$anchor.'"';
That way you can use an anchor variable for the selflink, very handy.

Example:

Code: Select all

{cms_selflink page="4" text='lees meer' anchor='wensen'}

Re: cms_selflink anchors

Posted: Mon Aug 15, 2005 1:28 pm
by Ted
Thanks for that.  It's in svn.

Re: cms_selflink anchors

Posted: Mon Jul 10, 2006 2:49 am
by cdstg
seems that this bit of code fell out of 0.13 at about line 247
as the other anchor links only works for the page that you are working on not for an other internal page