<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -31,4 +31,25 @@ which sets up a new Radius context and parser to expand tags in the &quot;rr&quot; namespa
 
 == Using other namespaces
 
-If you need to render more than twice, you can change the namespace used for a particular parser and context using the &lt;tt&gt;rerender_with_namespace(text, namespace, options)&lt;/tt&gt; method.
\ No newline at end of file
+If you need to render more than twice, you can change the namespace used for a particular parser and context using the &lt;tt&gt;rerender_with_namespace(text, namespace, options)&lt;/tt&gt; method.
+
+== &lt;r:rerender&gt;
+
+This extension includes one tag that acts as a basic rerenderer.  Sometimes the tag that contains a rerenderable tag doesn't need to do anything but call it with the correct namespace due to the fact that tags may have side-effects.  For example, the example above can be
+
+&lt;tt&gt;
+&lt;r:rerender&gt;
+  &lt;rr:table_of_contents/&gt;
+  
+&lt;r:h1&gt;Foo&lt;/r:h1&gt;
+
+...
+
+&lt;r:h2&gt;Bar&lt;/r:h2&gt;
+
+...
+
+&lt;/r:rerender&gt;
+&lt;/tt&gt;
+
+...as long as the &lt;r:hx&gt; tags add effect an instance variable of the page that's accessible to tag.globals.page.
\ No newline at end of file</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,22 @@
 module RerenderText
   include Radiant::Taggable
+  
+  desc %{
+    Use this to render the contained content twice
     
-  def rerender_text(text, options)
+    Usage:
+    &lt;pre&gt;&lt;code&gt;&lt;r:rerender [prefix=&quot;rr&quot;]&gt;...&lt;/r:rerender&gt;&lt;/code&gt;&lt;/pre&gt;
+  }
+  tag &quot;rerender&quot; do |tag|
+    prefix = tag.attr[&quot;prefix&quot;] || &quot;rr&quot;
+    rerender_text_with_prefix(tag.expand, prefix)
+  end
+  
+  def rerender_text(text, options = {})
     rerender_text_with_prefix(text, &quot;rr&quot;, options)
   end
   
-  def rerender_text_with_prefix(text, prefix, options)
+  def rerender_text_with_prefix(text, prefix, options = {})
     _context = RerenderContext.new(self, text, options)
     _parser = Radius::Parser.new(_context, :tag_prefix =&gt; prefix)
     new_text = _parser.parse(text)</diff>
      <filename>lib/rerender_text.rb</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,8 @@ unless String.method_defined? :to_slug
 end
 
 class Page
+  attr_reader :headers
+  
   6.times do |i|
     tag &quot;h#{i + 1}&quot; do |tag|
       contents = tag.expand
@@ -61,15 +63,10 @@ class Page
     end
   end
   
-  desc &quot;Pulls out all of the headers in a page&quot;
-  tag &quot;capture_headers&quot; do |tag|
-    rerender_text(tag.expand, :headers =&gt; @headers)
-  end
-  
   desc &quot;Renders the page table of contents&quot;
   tag &quot;toc&quot; do |tag|
     str = &quot;&lt;ul id='toc'&gt;&quot;
-    tag.locals.headers.each do |header|
+    tag.globals.page.headers.each do |header|
       str += %{&lt;li&gt;&lt;a href=&quot;##{header[:id]}&quot;&gt;#{header[:text]}&lt;/a&gt;&lt;/li&gt;}
     end
     str += &quot;&lt;/ul&gt;&quot;
@@ -85,7 +82,7 @@ describe Page, &quot;with a more complicated rerender tag&quot; do
 
     @page = Page.new(:title =&gt; &quot;Test Page&quot;, :slug =&gt; &quot;test-page&quot;, :status_id =&gt; 100, :breadcrumb =&gt; &quot;Test Page&quot;)
     rerender_text = %{
-&lt;r:capture_headers&gt;
+&lt;r:rerender&gt;
   &lt;rr:toc/&gt;
 
 &lt;r:h1&gt;Foo&lt;/r:h1&gt;
@@ -113,7 +110,7 @@ magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
 consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
 Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
 
-&lt;/r:capture_headers&gt;
+&lt;/r:rerender&gt;
 }
     @page.parts &lt;&lt; PagePart.new(:name =&gt; &quot;body&quot;, :content =&gt; rerender_text, :filter_id =&gt; &quot;Textile&quot;)
     @page.save!</diff>
      <filename>spec/models/page_with_rerender_text_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>709124fe3e1e779c3d74d2a31b32f4cdb59c5d3c</id>
    </parent>
  </parents>
  <author>
    <name>Andrew O'Brien</name>
    <email>aobrien@monkeydrome.local</email>
  </author>
  <url>http://github.com/AndrewO/rerender_text/commit/5b5c14cc05050327bc0dcfe50846e08a8bc99302</url>
  <id>5b5c14cc05050327bc0dcfe50846e08a8bc99302</id>
  <committed-date>2008-03-19T13:50:59-07:00</committed-date>
  <authored-date>2008-03-19T13:50:59-07:00</authored-date>
  <message>Added simple rerender tag.</message>
  <tree>5e75d5ea7098529fb2b8abdb2f17ddec9f06ace1</tree>
  <committer>
    <name>Andrew O'Brien</name>
    <email>aobrien@monkeydrome.local</email>
  </committer>
</commit>
