CMS Selflink

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
iNSiPiD

CMS Selflink

Post by iNSiPiD »

Hi guys,

What's the benefit of using the {cms_selflink} tag?

Will all instances of {cms_selflink page="foo"} be updated if I change the page's alias to bar?
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: CMS Selflink

Post by Ted »

Nope.

The only real advantage is that it takes of looking for assume_mod_rewrite, config paths, etc.
iNSiPiD

Re: CMS Selflink

Post by iNSiPiD »

Could we add a another real advantage?

How hard would it be to either automatically apply a class to the tag, or add a class paramter so that internal links can be styled differently?
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: CMS Selflink

Post by Ted »

Very easily.  Can you submit a feature request so I don't forget?
iNSiPiD

Re: CMS Selflink

Post by iNSiPiD »

Yes. And don't get upset now but...where, exactly, would I go to do this?

I'd always assumed there was an appropriate place for this sort of thing.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: CMS Selflink

Post by Ted »

http://bugs.cmsmadesimple.org

Same place that you would post bugs.  One of the priorities is Feature Request.

Thanks!
eokyere

Re: CMS Selflink

Post by eokyere »

what I did was add another option hrefonly to the tag... then after line 55, when the url has been found you can do:

Code: Select all

	if ($url != "") {
		if (isset($params['hrefonly']))
			return $url;
so it returns a raw href for you; from here u can do anything you want with it
Locked

Return to “CMSMS Core”