Removing domain name from internal links and URL calls

General project discussion. NOT for help questions.
Post Reply
User avatar
manc
Forum Members
Forum Members
Posts: 107
Joined: Wed Apr 01, 2009 12:59 pm

Removing domain name from internal links and URL calls

Post by manc »

I was wondeirng if there was an easy way to remove the domain name when A HREF'ing an internal URL

i.e. if a link is this:

news

can it be changed to this:

news

I know that this can be done with code changing (not researched into it) but wondered if there was an option I was missing.
NaN

Re: Removing domain name from internal links and URL calls

Post by NaN »

In TinyMCE settings in the advanced tab there is an option where you can setup if relative or absolute urls will be created.
But this only works for the Tiny.
If you use relative urls in Tiny make sure that you always have the tag in the head of your template.
(or the {metadata} tag - it will also print out the tag)
Otherwise you will get trouble when linking to a file.

As far as i know there is no option for the menu links.

Maybe this could be a feature request for the MenuManager?
Add a param like e.g. "url='absolute/relative'" to create relative or absolute urls also for the menu.
Or maybe even a feature request for the CMSms module API?
Just add a flag (true/false) to the CreateLink() function to create relative urls by the API.
Post Reply

Return to “General Discussion”