# Root Relative Linking

**URL:** <https://www.ruby-forum.com/t/root-relative-linking/145559>\
**Category:** Radiant CMS\
**Created:** [August 11, 2008, 4:29pm UTC](https://www.ruby-forum.com/t/root-relative-linking/145559 "2008-08-11T16:29:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenatron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Post date:** [August 11, 2008, 4:29pm UTC](https://www.ruby-forum.com/t/root-relative-linking/145559/1 "2008-08-11T16:29:51Z")

</div>

I have a main navigation set up like so:

\<r:navigation urls=“About:/about/| Blog:/blog/| Portfolio:/portfolio/”\>

I would like for the Blog link to be root relative, meaning that  
whereever the user is on the site, they will always go to a child of the  
root when they click a link.

So if a person is on [Custom Application Development Software for Business - Salesforce.com](http://www.site.com/misc/blah/blah) and they click the blog  
link they should be taken to [Custom Application Development Software for Business - Salesforce.com](http://www.site.com/blog).

However the way it is working now, they would be taken to  
[Custom Application Development Software for Business - Salesforce.com](http://www.site.com/misc/blah/blog).

This is due to the fact that the link created by the navigation tag  
looks like this:

… instead of [.](https://www.ruby-forum.com/blog/)

[ 

So, how can I get the navigation tag to maintain my forward slashes, and  
thus allow root relative linking?

 

Cheers!  
Ben

](https://www.ruby-forum.com/blog/)

---

<div class="post-metadata">

**Author:** ![glenatron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Post date:** [August 11, 2008, 4:42pm UTC](https://www.ruby-forum.com/t/root-relative-linking/145559/2 "2008-08-11T16:42:02Z")

</div>

On 11.08.2008, at 16:29, Ben M. wrote:

> So if a person is on [Custom Application Development Software for Business - Salesforce.com](http://www.site.com/misc/blah/blah) and they click the
> 
> So, how can I get the navigation tag to maintain my forward slashes,  
> and  
> thus allow root relative linking?

How do you “implement” your navigation area? just checked, and with

- | 
- 

as a snippet this gets rendered as

- [About](https://www.ruby-forum.com/about/) | 
- Blog | 
- [Portfolio](https://www.ruby-forum.com/portfolio/)

cu edi

–  
DI Edmund Haselwanter, removed\_email\_address@domain.invalid,  
[http://edmund.haselwanter.com/](http://edmund.haselwanter.com/)

---

<div class="post-metadata">

**Author:** ![glenatron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Post date:** [August 11, 2008, 5:14pm UTC](https://www.ruby-forum.com/t/root-relative-linking/145559/3 "2008-08-11T17:14:22Z")

</div>

Edmund Haselwanter wrote:

> How do you “implement” your navigation area? just checked, and with

Thanks for the reply Edmund.

Turns out it was a false alarm. I forgot to change the links from being  
hard coded to using the snippet.
