Absolute URL in tinymce link - eg: http://domain.com/{locallink:1091} Options
JoshReid
Posted: Thursday, October 02, 2008 12:27:08 AM

Rank: Enthusiast

Joined: 6/11/2008
Posts: 27
Location: New Zealand
Hi!

I would like to have all of my links sitewide absolute URLs for SEO purposes.

I have searched all ways of achieving this with no luck...

The Site Details:
1 domain with the hostname set in manage hostnames:

The umbracoSettings.config has
<useDomainPrefixes>true</useDomainPrefixes>

TINYMCE currently always does this...
/{localLink:1091}

I want it to do this:
http://www.domain.com/{localLink:1091}

Any known way of achieving this or am i fighting a losing battle? I really don't want to manually add the domain prefix to all links!

Any help or thoughts appreciated.

Cheers!
VirtualRichard
Posted: Thursday, October 02, 2008 11:19:24 AM

Rank: Fanatic

Joined: 9/17/2007
Posts: 265
Location: London, UK.
I'm very interested in this too and after reading this, more so.

Richard


2 * 3 * 3 * 37 : The prime factorisation of The Beast.
JoshReid
Posted: Tuesday, October 07, 2008 10:40:53 PM

Rank: Enthusiast

Joined: 6/11/2008
Posts: 27
Location: New Zealand
Bump... Any thoughts?!
Jamie Pollock
Posted: Wednesday, October 22, 2008 6:04:43 PM
Rank: Newbie

Joined: 7/24/2008
Posts: 4
Location: England, UK
Hi guys,
I've had the same problem with a multiple domain umbraco installation.

My thoughts were:

- To create an action handler when the page saves/publish/republish and

- Then perform a regular expression on the TinyMCE content, looking for the {locallink:#id}

- Then taking that id and traversing up it's tree to find the ancestor with a domain in "Manage Hostnames"

- concat the the found domain to url.


All I need now is the time to do it, any thoughts?

Umbraco Maverick of Essence Design.
JoshReid
Posted: Wednesday, October 22, 2008 9:13:37 PM

Rank: Enthusiast

Joined: 6/11/2008
Posts: 27
Location: New Zealand
Great plan Jamie!
Sounds like it should work... Sharing once it does??? ;)
Jamie Pollock
Posted: Monday, November 17, 2008 9:53:45 AM
Rank: Newbie

Joined: 7/24/2008
Posts: 4
Location: England, UK
Hi Josh,
Unfortunately after much research I found an actionhandler to be the wrong approach for the solution, I did however do some research into how locallinks are stored and it seems (as far as I can tell) they are stored in the umbraco.config (the xml) so that should be the data umbraco gives to the XSLT, perhaps if you added in some check in an XSLT to prepend a set url?

I say this because in our scenario we are running a multi-domain website so an upgrade to 3.0.6 (from 3.0.3) solved the problems with TinyMCE and Manage Hostnames.

Perhaps someone who knows a little more about how locallinks are transformed from the umbraco.config to the xslt to the actual data we see on the page can enlighten us on whether a transform at the XSLT stage can be achieved for absolute URLs?

Umbraco Maverick of Essence Design.
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.