# Automating navigation?

**URL:** <https://www.ruby-forum.com/t/automating-navigation/153456>\
**Category:** Radiant CMS\
**Created:** [November 17, 2008, 2:51pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456 "2008-11-17T14:51:02Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![littleknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@littleknown](https://www.ruby-forum.com/u/littleknown)\
**Post date:** [November 17, 2008, 2:51pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456/1 "2008-11-17T14:51:02Z")

</div>

Is there a way to automate the nav such that it shows a list of every  
page, or must you make a snippet and manually code all of the links?

---

<div class="post-metadata">

**Author:** ![littleknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@littleknown](https://www.ruby-forum.com/u/littleknown)\
**Post date:** [November 17, 2008, 4:19pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456/2 "2008-11-17T16:19:10Z")

</div>

Little K. wrote:

> Is there a way to automate the nav such that it shows a list of every  
> page, or must you make a snippet and manually code all of the links?

Like a site map? [http://wiki.radiantcms.org/How\_to\_Make\_a\_Site\_Map](http://wiki.radiantcms.org/How_to_Make_a_Site_Map)

Cheers,  
Mohit.  
11/17/2008 | 11:17 PM.

---

<div class="post-metadata">

**Author:** ![littleknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@littleknown](https://www.ruby-forum.com/u/littleknown)\
**Post date:** [November 17, 2008, 5:48pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456/3 "2008-11-17T17:48:27Z")

</div>

Mohit S. wrote:

> Little K. wrote:
> 
> > Is there a way to automate the nav such that it shows a list of every  
> > page, or must you make a snippet and manually code all of the links?
> 
> Like a site map? [http://wiki.radiantcms.org/How\_to\_Make\_a\_Site\_Map](http://wiki.radiantcms.org/How_to_Make_a_Site_Map)
> 
> Cheers,  
> Mohit.  
> 11/17/2008 | 11:17 PM.

Wow I can’t believe I missed that on the wiki. This works great although  
I am having one problem with it. The links that come out of sitemapper  
are formatted like [http://localhost/link/](http://localhost/link/) with a trailing /

If its /link/ my stylesheet isn’t showing up for some reason, but /link  
with no trailing slash works fine?

---

<div class="post-metadata">

**Author:** ![littleknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@littleknown](https://www.ruby-forum.com/u/littleknown)\
**Post date:** [November 17, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456/4 "2008-11-17T17:53:39Z")

</div>

Little K. wrote:

> Mohit S. wrote:
> 
> > Little K. wrote:
> > 
> > > Is there a way to automate the nav such that it shows a list of every  
> > > page, or must you make a snippet and manually code all of the links?
> > 
> > Like a site map? [http://wiki.radiantcms.org/How\_to\_Make\_a\_Site\_Map](http://wiki.radiantcms.org/How_to_Make_a_Site_Map)
> > 
> > Cheers,  
> > Mohit.  
> > 11/17/2008 | 11:17 PM.
> 
> Wow I can’t believe I missed that on the wiki. This works great although  
> I am having one problem with it. The links that come out of sitemapper  
> are formatted like [http://localhost/link/](http://localhost/link/) with a trailing /
> 
> If its /link/ my stylesheet isn’t showing up for some reason, but /link  
> with no trailing slash works fine?

Also is it possible to order the generated links? A weight attribute  
perhaps?

---

<div class="post-metadata">

**Author:** ![littleknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@littleknown](https://www.ruby-forum.com/u/littleknown)\
**Post date:** [November 17, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456/5 "2008-11-17T17:53:47Z")

</div>

Little K. wrote:

> 

A trailing / is a good thing. Is your stylesheet referenced relative to  
the page?

Cheers,  
Mohit.  
11/18/2008 | 12:52 AM.

---

<div class="post-metadata">

**Author:** ![littleknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@littleknown](https://www.ruby-forum.com/u/littleknown)\
**Post date:** [November 17, 2008, 6:15pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456/6 "2008-11-17T18:15:21Z")

</div>

Mohit S. wrote:

> Little K. wrote:
> 
> > 
> 
> A trailing / is a good thing. Is your stylesheet referenced relative to  
> the page?
> 
> Cheers,  
> Mohit.  
> 11/18/2008 | 12:52 AM.

I did the whole “make a stylesheet page in radiant” thing. perhaps I did  
something wrong there?

---

<div class="post-metadata">

**Author:** ![littleknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@littleknown](https://www.ruby-forum.com/u/littleknown)\
**Post date:** [November 17, 2008, 6:08pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456/7 "2008-11-17T18:08:28Z")

</div>

On Mon, Nov 17, 2008 at 4:53 PM, Little K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > > 11/17/2008 | 11:17 PM.
> > 
> > Wow I can’t believe I missed that on the wiki. This works great although  
> > I am having one problem with it. The links that come out of sitemapper  
> > are formatted like [http://localhost/link/](http://localhost/link/) with a trailing /
> > 
> > If its /link/ my stylesheet isn’t showing up for some reason, but /link  
> > with no trailing slash works fine?
> 
> Also is it possible to order the generated links? A weight attribute  
> perhaps?

If you install the Reorder extension[1](http://github.com/radiant/radiant-reorder-extension/tree/master) then you can specify the order  
in  
which pages appear. If you took this approach, you would also have to  
change:

```
<r:children:each by="title" order="asc">

```

to

```
<r:children:each by="position" order="asc">

```

In the sitemap example[2](http://wiki.radiantcms.org/How_to_Make_a_Site_Map).

---

<div class="post-metadata">

**Author:** ![littleknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@littleknown](https://www.ruby-forum.com/u/littleknown)\
**Post date:** [November 17, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456/8 "2008-11-17T18:24:17Z")

</div>

Andrew N. wrote:

> In the sitemap example[2](http://wiki.radiantcms.org/How_to_Make_a_Site_Map).

and since I wrote it, I am compelled to add this in addition Link #1:  
[http://wiki.radiantcms.org/Reorder](http://wiki.radiantcms.org/Reorder)

Cheers,  
Mohit.  
11/18/2008 | 1:22 AM.

---

<div class="post-metadata">

**Author:** ![littleknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@littleknown](https://www.ruby-forum.com/u/littleknown)\
**Post date:** [November 17, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456/9 "2008-11-17T18:24:48Z")

</div>

> If you install the Reorder extension[1](http://github.com/radiant/radiant-reorder-extension/tree/master) then you can specify the order  
> in  
> which pages appear. If you took this approach, you would also have to  
> change:
> 
> ```
> <r:children:each by="title" order="asc">
> 
> ```
> 
> to
> 
> ```
> <r:children:each by="position" order="asc">
> 
> ```
> 
> In the sitemap example[2](http://wiki.radiantcms.org/How_to_Make_a_Site_Map).

Thanks for the help, this is working well. Love how simple this CMS is  
🙂

---

<div class="post-metadata">

**Author:** ![littleknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@littleknown](https://www.ruby-forum.com/u/littleknown)\
**Post date:** [November 17, 2008, 6:29pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456/10 "2008-11-17T18:29:34Z")

</div>

Little K. wrote:

> Wow I can’t believe I missed that on the wiki. This works great although  
> I am having one problem with it. The links that come out of sitemapper  
> are formatted like [http://localhost/link/](http://localhost/link/) with a trailing /
> 
> If its /link/ my stylesheet isn’t showing up for some reason, but /link  
> with no trailing slash works fine?

Use View Source to take a look at the generated HTML in Firefox or IE.  
Then, see what URL it is trying to access for the style sheet. Then see  
if that URL is served up.

might give some hints…

Cheers,  
Mohit.  
11/18/2008 | 1:28 AM.

---

<div class="post-metadata">

**Author:** ![littleknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@littleknown](https://www.ruby-forum.com/u/littleknown)\
**Post date:** [November 17, 2008, 6:37pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456/11 "2008-11-17T18:37:36Z")

</div>

Mohit S. wrote:

> Little K. wrote:
> 
> > Wow I can’t believe I missed that on the wiki. This works great although  
> > I am having one problem with it. The links that come out of sitemapper  
> > are formatted like [http://localhost/link/](http://localhost/link/) with a trailing /
> > 
> > If its /link/ my stylesheet isn’t showing up for some reason, but /link  
> > with no trailing slash works fine?
> 
> Use View Source to take a look at the generated HTML in Firefox or IE.  
> Then, see what URL it is trying to access for the style sheet. Then see  
> if that URL is served up.
> 
> might give some hints…
> 
> Cheers,  
> Mohit.  
> 11/18/2008 | 1:28 AM.

You were right, I was linking the stylesheet as styles.css instead of  
/styles.css

Feelin’ pretty dumb 🙂 Thank you all for your help.

---

<div class="post-metadata">

**Author:** ![littleknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@littleknown](https://www.ruby-forum.com/u/littleknown)\
**Post date:** [November 17, 2008, 6:43pm UTC](https://www.ruby-forum.com/t/automating-navigation/153456/12 "2008-11-17T18:43:03Z")

</div>

Little K. wrote:

> > >
> 
> You were right, I was linking the stylesheet as styles.css instead of  
> /styles.css
> 
> Feelin’ pretty dumb 🙂 Thank you all for your help.

Welcome aboard 🙂  
Of course, you’re new so you don’t realize - I’m the reaper… after  
you’re familiar enough with Radiant, I’m going to come after you to urge  
you to write up some documentation for the Summer Reboot Documentation  
project.

Details at [http://wiki.radiantcms.org/Summer\_Reboot](http://wiki.radiantcms.org/Summer_Reboot)

🙂

But seriously, glad to be of help!

Cheers,  
Mohit.  
11/18/2008 | 1:41 AM.
