Not logged in (Log in or Sign up)

unwwwritten

SimpleNav plugin for SimpleLog

SimpleNav

SimpleNav is a mixin for the ActionController class and an accompanying Site helper that provide an easy way to add navigation links for each of your pages to your SimpleLog theme layouts and views.

Installation

To install SimpleNav you can:

./script/plugin install http://unwwwired-public.googlecode.com/svn/trunk/plugins/simple_nav/

Usage

To use SimpleNav you install the plugin and then call the Site helper navpageslinked() from the layout or view in which you want navigation links to your pages.

For example, to add page links to the top of the default SimpleLog theme insert a call to the helper inside the "top" div in the file themes/simplelog/layouts/site.rhtml as shown below:

<div id="top"><%= Site.nav_pages_linked @pages, "top_nav" %></div>

Providing you have added an "About" page to your blog, this results in HTML similar to the following (linebreaks have been added for readability):

<div id="top_nav">
<ul>
<li id="current"><a href="http://blog.myhost.com">Home</a></li>
<li><a href="http://blog.myhost.com/pages/about">About</a></li>
</ul>
</div>

Copyright (c) 2007 [S. Brent Faulkner], released under SimpleLog's license (GPL)

blog comments powered by Disqus