<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Forum posts to 'Archive'</title>
		<link>http://www.silverstripe.org/archive/rss</link>
		<atom:link href="http://www.silverstripe.org/archive/rss" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title>Re: Unigue URL Segment in SiteTree::write()</title>
			<link>http://www.silverstripe.org/archive/show/3528?start=0#post3574</link>
			<description>&lt;p&gt;Thanks, I applied this!  &lt;img src='http://www.silverstripe.org/sapphire/images/smilies/smile.gif'&gt; &lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Unigue URL Segment in SiteTree::write() &lt;a href=&quot;http://www.silverstripe.org/archive/show/3528?start=0#post3574&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/3528?start=0#post3574&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Tue, 07 Aug 2007 09:37:28 +1200</pubDate>
			<dc:creator>Andy</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/3528?start=0#post3574</guid>
		</item>
		
		<item>
			<title>Re: Unigue URL Segment in SiteTree::write()</title>
			<link>http://www.silverstripe.org/archive/show/3528?start=0#post3542</link>
			<description>&lt;p&gt;That sounds good to me. I guess it was a miss that it did what it was originally doing, with a number already in the URL segment. Andy, could you make sure this is patched in the main branch?  &lt;img src='http://www.silverstripe.org/sapphire/images/smilies/smile.gif'&gt; &lt;/p&gt;&lt;p&gt;Sean&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Unigue URL Segment in SiteTree::write() &lt;a href=&quot;http://www.silverstripe.org/archive/show/3528?start=0#post3542&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/3528?start=0#post3542&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Mon, 06 Aug 2007 22:15:51 +1200</pubDate>
			<dc:creator>Sean</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/3528?start=0#post3542</guid>
		</item>
		
		<item>
			<title>Unigue URL Segment in SiteTree::write()</title>
			<link>http://www.silverstripe.org/archive/show/3528#post3528</link>
			<description>&lt;p&gt;Hi, &lt;br /&gt;I made a page &quot;My 2nd Page&quot; and my URLSegment was &quot;my-2nd-page&quot;, then I have duplicated this page, and my URL segment has been changed to &quot;mynd-page-2&quot; (wrong). I made the patch:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;--- SiteTree.php.orig&amp;nbsp;&amp;nbsp;&amp;nbsp;2007-08-06 17:48:37.000000000 +1200&lt;br /&gt;+++ SiteTree.php&amp;nbsp;&amp;nbsp;&amp;nbsp;2007-08-06 17:47:06.000000000 +1200&lt;br /&gt;@@ -419,7 +419,7 @@&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$count = 1;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(DataObject::get_one(&quot;SiteTree&quot;, &quot;URLSegment = '$this-&amp;gt;URLSegment' $idFilter&quot;)) {&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$count++;&lt;br /&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$this-&amp;gt;URLSegment = ereg_replace('-[0-9]+','', $this-&amp;gt;URLSegment) . &quot;-$count&quot;;&lt;br /&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$this-&amp;gt;URLSegment = ereg_replace('-[0-9]+$','', $this-&amp;gt;URLSegment) . &quot;-$count&quot;;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// If the URLSegment has been changed, rewrite links&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;And then duplication made URLSegment &quot;my-2nd-page-2&quot; (is that better?)&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Unigue URL Segment in SiteTree::write() &lt;a href=&quot;http://www.silverstripe.org/archive/show/3528#post3528&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/show/3528#post3528&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Mon, 06 Aug 2007 17:49:11 +1200</pubDate>
			<dc:creator>xmedeko</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/3528#post3528</guid>
		</item>
		

	</channel>
</rss>