<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Radiant Duplicate extension</title>
	<atom:link href="http://gravityblast.com/2007/05/02/radiant-duplicate-extension/feed/" rel="self" type="application/rss+xml" />
	<link>http://gravityblast.com/2007/05/02/radiant-duplicate-extension/</link>
	<description>...coding blast beat!</description>
	<lastBuildDate>Wed, 14 Apr 2010 21:27:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: andrear</title>
		<link>http://gravityblast.com/2007/05/02/radiant-duplicate-extension/comment-page-1/#comment-10</link>
		<dc:creator>andrear</dc:creator>
		<pubDate>Fri, 11 May 2007 16:35:48 +0000</pubDate>
		<guid isPermaLink="false">http://gravityblast.com/2007/05/02/radiant-duplicate-extension/#comment-10</guid>
		<description>Hey Mario, thank you very much for your patch..I know the second issue..but it will be better in Radiant 0.6.5..I&#039;m waiting for this version to improve my extensions..tnx again!</description>
		<content:encoded><![CDATA[<p>Hey Mario, thank you very much for your patch..I know the second issue..but it will be better in Radiant 0.6.5..I&#8217;m waiting for this version to improve my extensions..tnx again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario T. Lanza</title>
		<link>http://gravityblast.com/2007/05/02/radiant-duplicate-extension/comment-page-1/#comment-9</link>
		<dc:creator>Mario T. Lanza</dc:creator>
		<pubDate>Fri, 11 May 2007 04:03:48 +0000</pubDate>
		<guid isPermaLink="false">http://gravityblast.com/2007/05/02/radiant-duplicate-extension/#comment-9</guid>
		<description>Second issue (relates more to Radiant&#039;s design):
The addition of the &quot;Duplicate&quot; link to the standard Radiant interface only works if other extensions aren&#039;t competing to modify that interface.  For example, in the latest 0.6.1 version the Reorder extension modifies this interface.  As a result I don&#039;t get the Duplicate link.  I had to modify the Reorder extension to include the Duplicate link.

Anyway, your extension was *much needed* and very welcome!!  Thank you.</description>
		<content:encoded><![CDATA[<p>Second issue (relates more to Radiant&#8217;s design):<br />
The addition of the &#8220;Duplicate&#8221; link to the standard Radiant interface only works if other extensions aren&#8217;t competing to modify that interface.  For example, in the latest 0.6.1 version the Reorder extension modifies this interface.  As a result I don&#8217;t get the Duplicate link.  I had to modify the Reorder extension to include the Duplicate link.</p>
<p>Anyway, your extension was *much needed* and very welcome!!  Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario T. Lanza</title>
		<link>http://gravityblast.com/2007/05/02/radiant-duplicate-extension/comment-page-1/#comment-8</link>
		<dc:creator>Mario T. Lanza</dc:creator>
		<pubDate>Fri, 11 May 2007 04:00:36 +0000</pubDate>
		<guid isPermaLink="false">http://gravityblast.com/2007/05/02/radiant-duplicate-extension/#comment-8</guid>
		<description>It was necessary to fix the duplicate extension because the &quot;Copy whole tree&quot; option wasn&#039;t recursive enough.  It went only 2 generations deep.  Here&#039;s the revised method:

  def duplicate_children source_page, dest_page, recursive = false
    source_page.children.each do &#124;page&#124;
      new_page = duplicate_page page, dest_page
      if recursive
        page.children.each do &#124;sub_page&#124;
          new_page = duplicate_page sub_page, new_page
          duplicate_children sub_page, new_page, true
        end
      end
    end
  end</description>
		<content:encoded><![CDATA[<p>It was necessary to fix the duplicate extension because the &#8220;Copy whole tree&#8221; option wasn&#8217;t recursive enough.  It went only 2 generations deep.  Here&#8217;s the revised method:</p>
<p>  def duplicate_children source_page, dest_page, recursive = false<br />
    source_page.children.each do |page|<br />
      new_page = duplicate_page page, dest_page<br />
      if recursive<br />
        page.children.each do |sub_page|<br />
          new_page = duplicate_page sub_page, new_page<br />
          duplicate_children sub_page, new_page, true<br />
        end<br />
      end<br />
    end<br />
  end</p>
]]></content:encoded>
	</item>
</channel>
</rss>

