<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -25,6 +25,15 @@ To generate your NavigationHelper, run:
   
 The generated helper is documented with the method stubs for the above 3 parts
 
+Namespaces
+==========
+Every nav helper method takes a &quot;namespace&quot; parameter as its last or only parameter.
+The namespace parameter can be used to differentiate between different sets of
+navigation links. (i.e. main nav, and sub nav)
+If you only have 1 set of nav links, ignore the namespace parameter.
+If you have multiple sets of links, you can pass the namespace to 
+the &quot;nav_links&quot; method to get the appropriate links for that namespace.
+Namespaces should be symbols or strings, just be consistent.
 
 Example
 =======</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,18 @@
 module &lt;%= helper_name.camelcase %&gt;
   include SimpleNavHelper
   
+  
+  # NAMESPACES
+  # ==========
+  # Every nav helper method takes a &quot;namespace&quot; parameter as its last or only parameter.
+  # The namespace parameter can be used to differentiate between different sets of
+  # navigation links. (i.e. main nav, and sub nav)
+  # If you only have 1 set of nav links, ignore the namespace parameter.
+  # If you have multiple sets of links, you can pass the namespace to 
+  # the &quot;nav_links&quot; method to get the appropriate links for that namespace.
+  # Namespaces should be symbols or strings, just be consistent.
+  
+  
   # the nav_list method defines the navigation links as a hash with its options
   # order does not matter, and note that they will only appear once listed
   # in the nav_order method
@@ -12,7 +24,7 @@ module &lt;%= helper_name.camelcase %&gt;
   #   :signup =&gt; {:text =&gt; &quot;Sign Up&quot;, :href =&gt; signup_path},
   #   :settings =&gt; {:text =&gt; &quot;Settings&quot;, :href =&gt; settings_path}
   # }
-  def nav_list
+  def nav_list(namespace)
     {}
   end
 
@@ -26,7 +38,7 @@ module &lt;%= helper_name.camelcase %&gt;
   # else
   #   [:home, :signup, :login]
   # end
-  def nav_order
+  def nav_order(namespace)
     []
   end
 
@@ -57,7 +69,7 @@ module &lt;%= helper_name.camelcase %&gt;
   # use those two variables in this method
   # Note: Use the nav_selection_advanced method below for advanced logic that can't
   #       be boiled down to the simple logic here
-  def nav_selection_hash
+  def nav_selection_hash(namespace)
     {:else =&gt; :false}
   end
 
@@ -67,7 +79,7 @@ module &lt;%= helper_name.camelcase %&gt;
   # it can do anything you want, if it returns a value, it should be the key
   # of the nav link you want selected. if it returns nil or false, it will try
   # to determine the selected tab from the nav_selection_hash above
-  def nav_selection_advanced
+  def nav_selection_advanced(namespace)
     nil
   end
 end
\ No newline at end of file</diff>
      <filename>generators/nav_helper/templates/helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,30 +1,30 @@
 module SimpleNavHelper
-  def nav_list
+  def nav_list(namespace)
     {}
   end
 
-  def nav_order
+  def nav_order(namespace)
     []
   end
 
-  def nav_selection_hash
+  def nav_selection_hash(namespace)
     {:else =&gt; :false}
   end
 
-  def nav_selection_advanced
+  def nav_selection_advanced(namespace)
     nil
   end
 
-  def nav_links
-    list = nav_list.merge(:false =&gt; {})
-
+  def nav_links(namespace = nil)
     controller = params[:controller].intern
-    action = params[:action].intern
+    action = params[:action].intern    
     
-    selected = (method(:nav_selection_advanced).arity == 2 ? nav_selection_advanced(controller, action) : nav_selection_advanced)
+    list = nav_list(namespace).merge(:false =&gt; {})
+
+    selected = method(:nav_selection_advanced).arity == 3 ? nav_selection_advanced(controller, action, namespace) : nav_selection_advanced(namespace)    
     
     unless selected
-      selection_hash = method(:nav_selection_hash).arity == 2 ? nav_selection_hash(controller, action) : nav_selection_hash
+      selection_hash = method(:nav_selection_hash).arity == 3 ? nav_selection_hash(controller, action, namespace) : nav_selection_hash(namespace)
 
       ckey = selection_hash.keys.detect {|cs| cs.is_a?(Array) ? cs.include?(controller) : cs == controller } || :else
       if selection_hash[ckey].is_a?(Hash)
@@ -38,7 +38,7 @@ module SimpleNavHelper
     (list[selected || :false][:class] ||= []  ) &lt;&lt; &quot;selected&quot;
 
     content_tag :ul, :id =&gt; &quot;simple_nav&quot; do
-      nav_order.collect do |key|
+      nav_order(namespace).collect do |key|
         css_class = (list[key][:class] || []).join(&quot; &quot;)
         css_class = nil if css_class.empty?
         content_tag(:li, link_to(list[key][:text], list[key][:href]), :class =&gt; css_class)</diff>
      <filename>lib/simple_nav_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>17c43d0520882f0fe44a627e8a4c9772bad3376e</id>
    </parent>
  </parents>
  <author>
    <name>Arya Asemanfar</name>
    <email>arya.asemanfar@gmail.com</email>
  </author>
  <url>http://github.com/arya/simple_nav/commit/873c1227dfee38dc05835d3a00346f36aef3a1f2</url>
  <id>873c1227dfee38dc05835d3a00346f36aef3a1f2</id>
  <committed-date>2008-05-27T21:35:16-07:00</committed-date>
  <authored-date>2008-05-27T21:35:16-07:00</authored-date>
  <message>* added support for namespaces</message>
  <tree>6e89e7e730d3aaf0048692ce94e22d3085ffe27a</tree>
  <committer>
    <name>Arya Asemanfar</name>
    <email>arya.asemanfar@gmail.com</email>
  </committer>
</commit>
