<?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></title>
		<link>http://www.silverstripe.org/forums/rss</link>
		<atom:link href="http://www.silverstripe.org/forums/rss" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title>Re: How to include a Data Object Model in the search box?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/15436#post314104</link>
			<description>&lt;p&gt;Hello, I found this: &lt;br /&gt;&lt;a href=&quot;http://www.i-lateral.com/tutorials/extending-fulltextsearch-for-dataobjects/&quot; rel=&quot;nofollow&quot;&gt;http://www.i-lateral.com/tutorials/extending-fulltextsearch-for-dataobjects/&lt;/a&gt;&lt;br /&gt;But i haven't tried this but it should work. It's small and simple. That could help small sites. &lt;/p&gt;&lt;p&gt;I also found this: &quot;MATCH (Title, MenuTitle, Content, MetaTitle, &lt;br /&gt; &lt;a href=&quot;https://groups.google.com/group/silverstripe-dev/msg/f7af364f1fba2def&quot; rel=&quot;nofollow&quot;&gt;https://groups.google.com/group/silverstripe-dev/msg/f7af364f1fba2def&lt;/a&gt;&lt;br /&gt;I tried it but unfortunately it doesn't work for me. I find it hard to debug so i give up. &lt;/p&gt;&lt;p&gt;But an ultimate solution would be this: &lt;a href=&quot;http://code.google.com/p/lucene-silverstripe-plugin/&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/lucene-silverstripe-plugin/&lt;/a&gt; &lt;br /&gt;It will index all public pages.  &lt;/p&gt;&lt;p&gt;[Edit]&lt;/p&gt;&lt;p&gt;I can report the lucene plugin works very well. The relation search works perfectly. however, if i do&lt;br /&gt;wget &lt;a href=&quot;http://your.server.name/dev/tasks/ProcessJobQueueTask&quot; rel=&quot;nofollow&quot;&gt;http://your.server.name/dev/tasks/ProcessJobQueueTask&lt;/a&gt;  to index the website, i can only get the login page.  How to pass user/pass to wget? &lt;/p&gt;&lt;p&gt;[more edit]&lt;/p&gt;&lt;p&gt;and i found this for the wget problem: &lt;br /&gt;&lt;a href=&quot;http://www.silverstripe.org/general-questions/show/16560&quot; rel=&quot;nofollow&quot;&gt;http://www.silverstripe.org/general-questions/show/16560&lt;/a&gt;&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: How to include a Data Object Model in the search box? | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/15436#post314104&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/15436&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 22 May 2012 22:11:22 +1200</pubDate>
			<dc:creator>BenWu</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/15436#post314104</guid>
		</item>
		
		<item>
			<title>Re: How to include a Data Object Model in the search box?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/15436#post314103</link>
			<description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;Here are the links from my &quot;ss pastie&quot; file...&lt;/p&gt;&lt;p&gt;aram custom serach&lt;br /&gt;&lt;a href=&quot;http://www.silverstripe.org/all-other-modules/show/6641?start=24#post290089&quot; rel=&quot;nofollow&quot;&gt;http://www.silverstripe.org/all-other-modules/show/6641?start=24#post290089&lt;/a&gt;&lt;/p&gt;&lt;p&gt;my hacky way to custom search results&lt;br /&gt;&lt;a href=&quot;http://www.silverstripe.org/customising-the-cms/show/14067#post288644&quot; rel=&quot;nofollow&quot;&gt;http://www.silverstripe.org/customising-the-cms/show/14067#post288644&lt;/a&gt;&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: How to include a Data Object Model in the search box? | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/15436#post314103&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/15436&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 22 May 2012 21:23:47 +1200</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/15436#post314103</guid>
		</item>
		
		<item>
			<title>Re: How to include a Data Object Model in the search box?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/15436#post314088</link>
			<description>&lt;p&gt;may you want to check this module:&lt;br /&gt;&lt;a href=&quot;http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/&quot; rel=&quot;nofollow&quot;&gt;http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;you can learn it from this module or just use it&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: How to include a Data Object Model in the search box? | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/15436#post314088&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/15436&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 22 May 2012 05:31:41 +1200</pubDate>
			<dc:creator>danzzz</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/15436#post314088</guid>
		</item>
		
		<item>
			<title>Re: How to include a Data Object Model in the search box?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/15436#post314085</link>
			<description>&lt;p&gt;i would like to know as well. guess we have to extend the searchform function??&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: How to include a Data Object Model in the search box? | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/15436#post314085&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/15436&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 22 May 2012 04:50:38 +1200</pubDate>
			<dc:creator>BenWu</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/15436#post314085</guid>
		</item>
		
		<item>
			<title>Re: onBeforeWrite called multiple times</title>
			<link>http://www.silverstripe.org/data-model-questions/show/6805?start=8#post313974</link>
			<description>&lt;p&gt;Hello UncleCheese, could you explain why we shall use static class variable, not object variable??&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: onBeforeWrite called multiple times | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/6805?start=8#post313974&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/6805&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 15 May 2012 21:10:27 +1200</pubDate>
			<dc:creator>BenWu</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/6805?start=8#post313974</guid>
		</item>
		
		<item>
			<title>GroupBy is not supported in DataList for SilverStripe 3 ?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19869</link>
			<description>&lt;p&gt;Hi there,&lt;/p&gt;&lt;p&gt;I am struggling to convert the code below from the tutorial (&lt;a href=&quot;http://doc.silverstripe.org/sapphire/en/tutorials/3-forms&quot; rel=&quot;nofollow&quot;&gt;http://doc.silverstripe.org/sapphire/en/tutorials/3-forms&lt;/a&gt;) to Silverstripe 3. I understand using DataList is a recommend approach and DataObjectSet is depreciated, but it seems that Group By is not supported in DataList.&lt;br /&gt;Anyone has idea how to make the code working using SilverStripe 3’s new ORM like &lt;a href=&quot;http://www.silverstripe.org/silverstripe-3-s-new-orm/&quot; rel=&quot;nofollow&quot;&gt;http://www.silverstripe.org/silverstripe-3-s-new-orm/&lt;/a&gt; ?&lt;/p&gt;&lt;p&gt;function BrowserPollResults() {&lt;br /&gt;    $submissions = DataObject::get('BrowserPollSubmission');&lt;br /&gt;    $total = $submissions-&amp;gt;Count();&lt;/p&gt;&lt;p&gt;    $doSet = new DataObjectSet();&lt;br /&gt;    foreach($submissions-&amp;gt;groupBy('Browser') as $browser =&amp;gt; $data) {&lt;br /&gt;        $percentage = (int) ($data-&amp;gt;Count() / $total * 100);&lt;br /&gt;        $record = array(&lt;br /&gt;            'Browser' =&amp;gt; $browser,&lt;br /&gt;            'Percentage' =&amp;gt; $percentage&lt;br /&gt;        );&lt;br /&gt;        $doSet-&amp;gt;push(new ArrayData($record));&lt;br /&gt;    }&lt;/p&gt;&lt;p&gt;    return $doSet;&lt;br /&gt;}&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: GroupBy is not supported in DataList for SilverStripe 3 ? | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19869&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19869&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Sun, 13 May 2012 10:47:25 +1200</pubDate>
			<dc:creator>Frankieboy</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19869</guid>
		</item>
		
		<item>
			<title>Re: Pagination not working with a selected &#39;type&#39; of children.</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19830#post313908</link>
			<description>&lt;p&gt;Thank you martimiz for your time. I won't get a chance to try this for a couple days as I am out of town, but as soon as I can I will give it a go and report back. I really appreciate your taking the time to brainstorm this matter.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Pagination not working with a selected &amp;#39;type&amp;#39; of children. | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19830#post313908&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19830&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Sat, 12 May 2012 05:15:11 +1200</pubDate>
			<dc:creator>BigMoose</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19830#post313908</guid>
		</item>
		
		<item>
			<title>Re: Adding option drop-downs to pages</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19854#post313883</link>
			<description>&lt;p&gt;You probably need to declare:&lt;/p&gt;&lt;p&gt;static $db = array(); or a $has_one or $has_many relationship titled 'ShowSocial'&lt;/p&gt;&lt;p&gt;Else you are giving the program the interface to do what you want, but you're not giving it anywhere to be saved.&lt;/p&gt;&lt;p&gt;Chur&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Adding option drop-downs to pages | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19854#post313883&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19854&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Fri, 11 May 2012 08:57:48 +1200</pubDate>
			<dc:creator>novaweb</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19854#post313883</guid>
		</item>
		
		<item>
			<title>Adding option drop-downs to pages</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19854</link>
			<description>&lt;p&gt;I'm trying to figure out how to add an option on my CMS editor page, sidebar content. So far I've done this:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;function getCMSFields() &lt;br /&gt;   { &lt;br /&gt;      $fields = parent::getCMSFields(); &lt;br /&gt;      $fields-&amp;gt;addFieldToTab(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;     &quot;Root.Content.Sidebar&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new HTMLEditorField('SideContent','Sidebar content')); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  $fields-&amp;gt;addFieldToTab(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;     &quot;Root.Content.Sidebar&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  new OptionsetField(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    'ShowSocial',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    $title = 'Show social widgets on this page',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    $source = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  '1' =&amp;gt; 'show','2' =&amp;gt; 'hide'),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'1'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    ));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;br /&gt;      return $fields;&lt;br /&gt;   }&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;In my page controller, which shows the controls but doesn't save their state when I click save. What am I missing?&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Adding option drop-downs to pages | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19854&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19854&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Fri, 11 May 2012 03:02:55 +1200</pubDate>
			<dc:creator>Spaghetti</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19854</guid>
		</item>
		
		<item>
			<title>Re: Pagination not working with a selected &#39;type&#39; of children.</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19830#post313860</link>
			<description>&lt;p&gt;In your query ou're still retrieving every video object for the given page, and then you let your template decide what items to show. Default pagination is based on the entire DataObjectSet you retrieved, so that would account for the wrong number of pages.&lt;/p&gt;&lt;p&gt; You might consider adding the videotype to the query itself. Something like this (I'm basing this on your code - there might be a better way to do this by reconstructing the page structure, but just for an idea...):&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;function Videos($videotype='') {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(!isset($_GET['film']) || !is_numeric($_GET['film']) || (int)$_GET['film'] &amp;lt; 1) $_GET['film'] = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$SQL_start = (int)$_GET['film'];&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$myFilter = &quot;`ParentID` = '&quot;.$this-&amp;gt;ID.&quot;'&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ($videotype) $myFilter .= &quot; AND `{$videotype}` = '1'&quot;; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$doSet = DataObject::get(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$callerClass = &quot;VideoPage&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$filter = $myFilter,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$sort = &quot;&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$join = &quot;&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$limit = &quot;{$SQL_start},9&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $doSet ? $doSet : false;&lt;br /&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;... and ...&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;public function Corporate() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (isset($_REQUEST['corporate']) &amp;amp;&amp;amp; $_REQUEST['corporate'] == &quot;1&quot;) return $this-&amp;gt;Videos('TypeCorporate');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else return false;&lt;br /&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Then you could&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;&amp;lt;% if Corporate %&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;% control Corporate %&amp;gt;&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;lt;% end_control %&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;&amp;lt;% end_if %&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;I've not tested this, it's just an idea  &lt;img src='http://www.silverstripe.org/sapphire/images/smilies/smile.gif'&gt; &lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Pagination not working with a selected &amp;#39;type&amp;#39; of children. | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19830#post313860&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19830&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Thu, 10 May 2012 23:16:16 +1200</pubDate>
			<dc:creator>martimiz</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19830#post313860</guid>
		</item>
		
		<item>
			<title>Re: Pagination not working with a selected &#39;type&#39; of children.</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19830#post313850</link>
			<description>&lt;p&gt;I believe that is correct. I changed the css, so that all the items in the 3x3 grid have exactly the same spacing. So I no longer use &amp;lt;% if MultipleOf(3) %&amp;gt; in my template. So that solved the issue of the spacing causing problems.&lt;/p&gt;&lt;p&gt;I did look at that tutorial on ssbits, but did not have success with it. It's probably due to the way I have chosen to write my code for sorting the video types. I came close to having success with this code:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;function Videos() {&lt;br /&gt;    if(!isset($_GET['film']) || !is_numeric($_GET['film']) || (int)$_GET['film'] &amp;lt; 1) $_GET['film'] = 0;&lt;br /&gt;    $SQL_start = (int)$_GET['film'];&lt;br /&gt;    $doSet = DataObject::get(&lt;br /&gt;      $callerClass = &quot;VideoPage&quot;,&lt;br /&gt;      $filter = &quot;`ParentID` = '&quot;.$this-&amp;gt;ID.&quot;'&quot;,&lt;br /&gt;      $sort = &quot;&quot;,&lt;br /&gt;      $join = &quot;&quot;,&lt;br /&gt;      $limit = &quot;{$SQL_start},9&quot;&lt;br /&gt;    );&lt;/p&gt;&lt;p&gt;    return $doSet ? $doSet : false;&lt;br /&gt;   }&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Again, I have zero idea what this code means. But changing it from $_GET['start'] to $_GET['film'] did partially work when I wanted to display pagination for just the film type videos. It would create the grid in the proper way even when using the old spacing and &amp;lt;%if Multiple Of(3) %&amp;gt;, but I would be left with links for page two, even though nothing existed on page two.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Pagination not working with a selected &amp;#39;type&amp;#39; of children. | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19830#post313850&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19830&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Thu, 10 May 2012 04:08:46 +1200</pubDate>
			<dc:creator>BigMoose</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19830#post313850</guid>
		</item>
		
		<item>
			<title>Re: Pagination not working with a selected &#39;type&#39; of children.</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19830#post313839</link>
			<description>&lt;p&gt;I'm not sure if I get this right, but what you seem to be doing in your template, is in fact loop the entire DataObjectSet - and based on &amp;lt;% if Film %&amp;gt; filter, decide whether to show an item or not. That would mean that item 5 from the set would still be item 5. even though items 1, 2, 3 and 4 are not displayed...&lt;/p&gt;&lt;p&gt;Unfortunately paginating a filtered DataObjectSet isn't as straightforward. There's this tut on ssbits that might help you along:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.ssbits.com/tutorials/2010/paginating-a-filtered-dataobjectset/&quot; rel=&quot;nofollow&quot;&gt;http://www.ssbits.com/tutorials/2010/paginating-a-filtered-dataobjectset/&lt;/a&gt;&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Pagination not working with a selected &amp;#39;type&amp;#39; of children. | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19830#post313839&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19830&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Wed, 09 May 2012 06:14:07 +1200</pubDate>
			<dc:creator>martimiz</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19830#post313839</guid>
		</item>
		
		<item>
			<title>Pagination not working with a selected &#39;type&#39; of children.</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19830</link>
			<description>&lt;p&gt;I'm not desperately code savvy, but my website is coming along great non-the-less thanks to the forum posts from the past. However, I am struggling with one issue.&lt;/p&gt;&lt;p&gt;Essentially, my website has a page which displays a video gallery grid - 3x3 grid of thumbnails appears, and the user can click on a video to watch. Additionally, the videos can be viewed based on what type they are. In my case, there are only 4 options: Film &amp;amp; Television, Corporate, Sports &amp;amp; Events, and Other.&lt;/p&gt;&lt;p&gt;I've currently got things set up like this - there is a VideoHolder.php, and the child VideoPage.php.&lt;br /&gt;VideoPage.php has the following code:&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;class VideoPage extends SiteTree {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public static $db = array(&lt;br /&gt;        // Variables to classify the videos&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;'TypeFilmTV' =&amp;gt; 'Boolean',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;'TypeCorporate' =&amp;gt; 'Boolean',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;'TypeSportsEvents' =&amp;gt; 'Boolean',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;'TypeOther' =&amp;gt; 'Boolean',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/p&gt;&lt;p&gt;// Down here I have all the new checkboxfields to appear in the cms.&lt;br /&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;The idea is that I can use &amp;lt;% if TypeFilmTV %&amp;gt; in my template to show only the ones of that type if it is selected.&lt;br /&gt;I used checkboxes instead of a dropdown because a video could be classified as more than one type, and there are not many types anyway.&lt;/p&gt;&lt;p&gt;Now, in order that the user may select a video type to view on the page, I simply coded the link to add ?vidType=1 at the end of the link. These links are just a row of five buttons at the top of the page: &quot;See All&quot;, &quot;Film &amp;amp; Television&quot;, etc.&lt;/p&gt;&lt;p&gt;I then added the following into VideoHolder.php&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;class VideoHolder_Controller extends Page_Controller {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function Film()&lt;br /&gt;    {return isset($_REQUEST['film']) &amp;amp;&amp;amp; $_REQUEST['film'] == &quot;1&quot;;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function Corporate()&lt;br /&gt;    {return isset($_REQUEST['corporate']) &amp;amp;&amp;amp; $_REQUEST['corporate'] == &quot;1&quot;;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function Events()&lt;br /&gt;    {return isset($_REQUEST['events']) &amp;amp;&amp;amp; $_REQUEST['events'] == &quot;1&quot;;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function Other()&lt;br /&gt;    {return isset($_REQUEST['other']) &amp;amp;&amp;amp; $_REQUEST['other'] == &quot;1&quot;;}&lt;br /&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Then in my VideoHolder.ss template I could simply use a link as mentioned above with the added ?film=1 as an example and then write&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;&amp;lt;% if Film %&amp;gt; // Or whatever type I am working with&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Anyway, all this works fine and dandy. The real problem I am having is when I use pagination now. In order to create my 3x3 grid, I have padding on the right side of each thumbnail except for the third one in each row. This is giving me the spacing I desire. I am accomplishing this by simply using:&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;&amp;lt;% if MultipleOf(3) %&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;When pagination is used to view all the videos, it works perfectly. However, when a type is selected, pagination does not seem to 'see' the new position of each video. For example, suppose &quot;video A&quot; was third in the row, and &quot;video B&quot; appeared on page two when viewing all videos. Now when viewing just the videos labelled at &quot;Film &amp;amp; Television&quot; 'video A' appears in the second position. What will then happen is that 'video A' still does not have the padding on the right which had been controlled using &amp;lt;%MultipleOf(3)%&amp;gt;, even though it now appears second. Furthermore, &quot;video B&quot; is still showing on page 2 despite only 3 videos now appearing on page 1, and pagination coded to show 9 items per page. I hope this example is clear.&lt;/p&gt;&lt;p&gt;My pagination function is in my VideoHolder_Controller and looks like this&lt;br /&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;function Videos() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  if(!isset($_GET['start']) || !is_numeric($_GET['start']) || (int)$_GET['start'] &amp;lt; 1) $_GET['start'] = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  $SQL_start = (int)$_GET['start'];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  $doSet = DataObject::get(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$callerClass = &quot;VideoPage&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$filter = &quot;`ParentID` = '&quot;.$this-&amp;gt;ID.&quot;'&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$sort = &quot;&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$join = &quot;&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$limit = &quot;{$SQL_start},9&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  return $doSet ? $doSet : false;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;I believe this code needs to be altered, but I have no idea how this code works. Again, I am not code savvy. I simply got this code from:&lt;br /&gt;&lt;a href=&quot;http://doc.silverstripe.org/old/private:recipes:pagination&quot; rel=&quot;nofollow&quot;&gt;http://doc.silverstripe.org/old/private:recipes:pagination&lt;/a&gt; and altered it very slightly for my needs. If anyone has an idea on how to alter this piece of code, and is willing to dumb it down for this shmuck I'd would be very appreciative. Thanking you in advance.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Pagination not working with a selected &amp;#39;type&amp;#39; of children. | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19830&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19830&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Sun, 06 May 2012 04:19:10 +1200</pubDate>
			<dc:creator>BigMoose</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19830</guid>
		</item>
		
		<item>
			<title>Dynamically related content</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19804</link>
			<description>&lt;p&gt;Hy dudes from all over the world.&lt;br /&gt;I'm having problems in design-solution-approach.&lt;/p&gt;&lt;p&gt;Here's the scenario:&lt;br /&gt;I have my sitetree in this structure:&lt;/p&gt;&lt;p&gt;company -&amp;gt;Locations-&amp;gt;Events&lt;/p&gt;&lt;p&gt;All of those have galleries and articles in a subsection.&lt;/p&gt;&lt;p&gt;I would like to use the tag system, but here's my problem. I want to crawl the whole sitetree, collect all tags from every page and than compare by 1 tag, 2 tags, 3 tags.... If one of thes matches show the related content.&lt;/p&gt;&lt;p&gt;In next step i have to filter them, let's say: I have pagetype article with 2 related tags show only the related content from documenttype article.&lt;/p&gt;&lt;p&gt;I solved this problem in umbraco and c# but i like the approach of silverstripe to handle data with grids and the extensibility.&lt;/p&gt;&lt;p&gt;Greetings Toni.&lt;/p&gt;&lt;p&gt;Code snippets would be nice if somebody solved this problem.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Dynamically related content | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19804&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19804&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Thu, 03 May 2012 22:14:06 +1200</pubDate>
			<dc:creator>tonibecker</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19804</guid>
		</item>
		
		<item>
			<title>Re: Get Relation on data durung onBeforeWrite (first time) [SOLVED]</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19795#post313685</link>
			<description>&lt;p&gt;I got fixed, the DataObject in question was an extension of DataObjectAsPage so I wrapped the functions in my onBeforeWrite in a if($this-&amp;gt;ID !=0). I'll post that it needs to be documented&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Get Relation on data durung onBeforeWrite (first time) [SOLVED] | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19795#post313685&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19795&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Thu, 03 May 2012 12:49:29 +1200</pubDate>
			<dc:creator>zenmonkey</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19795#post313685</guid>
		</item>
		
		<item>
			<title>Re: Get Relation on data durung onBeforeWrite (first time) [SOLVED]</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19795#post313665</link>
			<description>&lt;p&gt;can you do a var_dump of $this and check for anything that matches the relationship?&lt;/p&gt;&lt;p&gt;we are talking a has_one relationship right?&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Get Relation on data durung onBeforeWrite (first time) [SOLVED] | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19795#post313665&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19795&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Thu, 03 May 2012 00:59:01 +1200</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19795#post313665</guid>
		</item>
		
		<item>
			<title>Re: Get Relation on data durung onBeforeWrite (first time) [SOLVED]</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19795#post313664</link>
			<description>&lt;p&gt;The relation is still null at onBeforeWrite the first time. It doesn't get created until the actual write. I'm talking about the initial creation of the record&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Get Relation on data durung onBeforeWrite (first time) [SOLVED] | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19795#post313664&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19795&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Thu, 03 May 2012 00:56:41 +1200</pubDate>
			<dc:creator>zenmonkey</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19795#post313664</guid>
		</item>
		
		<item>
			<title>Re: Get Relation on data durung onBeforeWrite (first time) [SOLVED]</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19795#post313660</link>
			<description>&lt;p&gt;If it is a has_one then $this-&amp;gt;RelationNameID should work&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Get Relation on data durung onBeforeWrite (first time) [SOLVED] | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19795#post313660&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19795&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Wed, 02 May 2012 19:56:25 +1200</pubDate>
			<dc:creator>swaiba</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19795#post313660</guid>
		</item>
		
		<item>
			<title>Get Relation on data durung onBeforeWrite (first time) [SOLVED]</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19795</link>
			<description>&lt;p&gt;I have a dataobject in which I need relation data for a function on the first onBeforeWrite. The relation is set with DropdownField populated with a toDropdownMap in the CMS. In theory I should be able pull the ID from that form element but I'm not sure how its passed to the onBeforeWrite function. Calling $this-&amp;gt;RelatedDataObejct doesn't work because that relation isn't set yet. And I can't get the form Value with $this-&amp;gt;getField(); &lt;/p&gt;&lt;p&gt;I could call the function I need in onAfterWrite and only fire it if the value I'm creating is null and putting another write function in it but that just seems like a recipe for disaster with potential write loops &lt;/p&gt;&lt;p&gt;Any ideas?&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Get Relation on data durung onBeforeWrite (first time) [SOLVED] | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19795&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19795&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Wed, 02 May 2012 13:32:20 +1200</pubDate>
			<dc:creator>zenmonkey</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19795</guid>
		</item>
		
		<item>
			<title>Re: jquerymobile Weirdness - editor issue</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19222#post313530</link>
			<description>&lt;p&gt;Or a jQuery solution...&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;;(function($){&lt;br /&gt;    $(document).bind(&quot;pageinit&quot;, function(){&lt;br /&gt;        $('.typography img').each(function(){&lt;br /&gt;            $(this).attr('src','/'+$(this).attr('src'));&lt;br /&gt;        });&lt;br /&gt;    });&lt;br /&gt;})(jQuery);&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: jquerymobile Weirdness - editor issue | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19222#post313530&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19222&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Wed, 25 Apr 2012 03:49:18 +1200</pubDate>
			<dc:creator>bembo99</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19222#post313530</guid>
		</item>
		
		<item>
			<title>Re: jquerymobile Weirdness - editor issue</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19222#post313420</link>
			<description>&lt;p&gt;Right, got a better solution. Worked for me, try this:&lt;/p&gt;&lt;p&gt;in your mysite / _config.php add a configuration variable to say where your assets folder is relative to '/' (your web root) -as this is 'installation-specific configuration'.&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;//My assets dir is off a subdirectory which is SS's root.&lt;br /&gt;global $assetsPrependHack;&lt;br /&gt;$assetsPrependHack = &quot;/ss/assets/&quot;;&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Then in mysite / code / Page.php I added something similar to that blog post I mentioned before:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;//AC: Hack to rewrite the start of asset &lt;br /&gt;// urls so that they work on the ajaxy mobile version of the site.&lt;br /&gt;global $assetsPrependHack;&lt;br /&gt;if( isset($assetsPrependHack) ) {&lt;br /&gt;  $this-&amp;gt;Content = str_replace(&lt;br /&gt;    ' src=&quot;assets/', ' src=&quot;'.$assetsPrependHack,&lt;br /&gt;    $this-&amp;gt;Content);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: jquerymobile Weirdness - editor issue | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19222#post313420&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19222&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Fri, 20 Apr 2012 01:13:20 +1200</pubDate>
			<dc:creator>Spaghetti</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19222#post313420</guid>
		</item>
		
		<item>
			<title>Re: jquerymobile Weirdness - editor issue</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19222#post313413</link>
			<description>&lt;p&gt;Yes I've experienced this too. What fun.&lt;/p&gt;&lt;p&gt;There is one workaround, you can extend Page's onWriteBefore method to prefix the URL but I don't like this as it won't work if silverstripe isn't installed in the root directory on your server (so, for instance for local testing, it's no good to me). Found it in this post: &lt;a href=&quot;http://www.electrictoolbox.com/silverstripe-prefix-img-src-assets-leading-slash/&quot; rel=&quot;nofollow&quot;&gt;http://www.electrictoolbox.com/silverstripe-prefix-img-src-assets-leading-slash/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I have a workaround but it's not pretty. Basically absolute urls. This works but it's fuggly UX. I really don't like the whole 'image dialog' anyway, it's really bad design - ideally I'd like a point and click solution.&lt;/p&gt;&lt;p&gt;Looking for a better way... let you know if I find one.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: jquerymobile Weirdness - editor issue | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19222#post313413&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19222&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Thu, 19 Apr 2012 21:05:52 +1200</pubDate>
			<dc:creator>Spaghetti</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19222#post313413</guid>
		</item>
		
		<item>
			<title>Re: Relation Performance</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19691#post313327</link>
			<description>&lt;p&gt;You could maybe check out what happens by adding a ?showqueries=1 to your URL. I often use that in situations like this...&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Relation Performance | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19691#post313327&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19691&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Sun, 15 Apr 2012 04:19:23 +1200</pubDate>
			<dc:creator>martimiz</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19691#post313327</guid>
		</item>
		
		<item>
			<title>Relation Performance</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19691</link>
			<description>&lt;p&gt;Ok I have a performance question. Consider the following&lt;/p&gt;&lt;p&gt;Page A has many Object B and has Many Object C&lt;br /&gt;Object B Has One Page A and Has 1 Object C&lt;br /&gt;Object C Has One Page A and Many Object B&lt;/p&gt;&lt;p&gt;When I render the page and I need to get the Object B has 1 Object C relation, does it run the relation query for each instance of Object B or does SS already know it has Object C because of the Has Many Relation with the page?&lt;/p&gt;&lt;p&gt;I know its not a big deal on small numbers, but I worry at how it will scale. Would it be better to cache Object B and Object C and pull the relationship data from that cache or will the extra filter operations cancel any performance gains?&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Relation Performance | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19691&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19691&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Sun, 15 Apr 2012 01:27:37 +1200</pubDate>
			<dc:creator>zenmonkey</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19691</guid>
		</item>
		
		<item>
			<title>Re: Filtering a DataObjectSet by range query?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19548#post313193</link>
			<description>&lt;p&gt;Hi Nico,&lt;/p&gt;&lt;p&gt;i don't know if you mean filtering on backend or frontend. For the ModelAdmin in BE this will maybe a good start to look at: &lt;a href=&quot;http://www.leftandmain.com/silverstripe-tutorials/2011/03/15/taming-the-beast-remodeling-modeladmin-part-2/&quot; rel=&quot;nofollow&quot;&gt;http://www.leftandmain.com/silverstripe-tutorials/2011/03/15/taming-the-beast-remodeling-modeladmin-part-2/&lt;/a&gt;. But keep in mind this is for ModelAdmin for SS2. Good luck…&lt;/p&gt;&lt;p&gt;Pipifix.&lt;/p&gt;&lt;p&gt;PS:Grüße aus Leipzig.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Filtering a DataObjectSet by range query? | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19548#post313193&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19548&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 10 Apr 2012 20:56:00 +1200</pubDate>
			<dc:creator>Pipifix</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19548#post313193</guid>
		</item>
		
		<item>
			<title>Re: [solved] Make DOs searchable (Fulltextsearch)</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19177#post313191</link>
			<description>&lt;p&gt;Hello again.&lt;/p&gt;&lt;p&gt;Just for the records. I've used Arams fine module &lt;a href=&quot;http://www.ssbits.com/tutorials/2012/dataobject-as-pages-the-module/&quot; rel=&quot;nofollow&quot;&gt;Dataobject as pages &lt;/a&gt;. It contains a built-in-searchfunctionality. Nevertheless thanks a lot for your help and additional infos.&lt;/p&gt;&lt;p&gt;Pipifix&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: [solved] Make DOs searchable (Fulltextsearch) | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19177#post313191&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19177&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 10 Apr 2012 20:35:26 +1200</pubDate>
			<dc:creator>Pipifix</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19177#post313191</guid>
		</item>
		
		<item>
			<title>Re: Decorating DataObjectSet?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19448#post313139</link>
			<description>&lt;p&gt;Hi fatlewis! Could it just be that you're missing the ( ) at the end of -&amp;gt;items?&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;shuffle($this-&amp;gt;owner-&amp;gt;Items());&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;This isn't my first post but usually I'm here asking questions not answering them (I'm procrastinating pretty epically right now so figured I'd try to be useful at least) so please be nice back if this is doesn't do the trick  &lt;img src='http://www.silverstripe.org/sapphire/images/smilies/smile.gif'&gt; &lt;/p&gt;&lt;p&gt;EDIT: just saw the date on the post heh. ah well. hope it helps someone.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Decorating DataObjectSet? | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19448#post313139&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19448&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Sun, 08 Apr 2012 03:09:30 +1200</pubDate>
			<dc:creator>dizzystuff</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19448#post313139</guid>
		</item>
		
		<item>
			<title>Re: [SOLVED] Data object belongs_many_many, no relation after csv import</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19618#post313118</link>
			<description>&lt;p&gt;I think I solved this.&lt;/p&gt;&lt;p&gt;I changed the relationships to has_one &amp;amp; has_many.&lt;/p&gt;&lt;p&gt;I added the following to the model admin extension:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $model_importers = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Standing' =&amp;gt; 'StandingCsvBulkLoader',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/p&gt;&lt;p&gt;And extended CsvBulkLoader like so:&lt;br /&gt;class StandingCsvBulkLoader extends CsvBulkLoader {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public $columnMap = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Place' =&amp;gt; 'Place',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Bowler' =&amp;gt; 'Bowler',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Series' =&amp;gt; 'Series',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Average' =&amp;gt; 'Average',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Handicap' =&amp;gt; 'Handicap',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Game1' =&amp;gt; 'Game1',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Game2' =&amp;gt; 'Game2',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Game3' =&amp;gt; 'Game3',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Game4' =&amp;gt; 'Game4',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Season' =&amp;gt; 'Season.Title'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public $relationCallbacks = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Season.Title' =&amp;gt; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'relationname' =&amp;gt; 'Season',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'callback' =&amp;gt; 'getSeasonByTitle'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static function getSeasonByTitle(&amp;amp;$obj, $val, $record) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$SQL_val = Convert::raw2sql($val);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return DataObject::get_one(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'SeasonPage', &quot;Title = '{$SQL_val}'&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;}&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: [SOLVED] Data object belongs_many_many, no relation after csv import | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19618#post313118&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19618&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Fri, 06 Apr 2012 15:14:04 +1200</pubDate>
			<dc:creator>MattIn4D</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19618#post313118</guid>
		</item>
		
		<item>
			<title>[SOLVED] Data object belongs_many_many, no relation after csv import</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19618</link>
			<description>&lt;p&gt;I have a data object that contains tournament standings.&lt;/p&gt;&lt;p&gt;class Standing extends DataObject&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $db = array (&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Place' =&amp;gt; 'Text',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Prize' =&amp;gt; 'Text',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Bowler' =&amp;gt; 'Text',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Series' =&amp;gt; 'Text',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Average' =&amp;gt; 'Text',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Handicap' =&amp;gt; 'Text',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Game1' =&amp;gt; 'Text',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Game2' =&amp;gt; 'Text',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Game3' =&amp;gt; 'Text',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Game4' =&amp;gt; 'Text'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $summary_fields = array (&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Place' =&amp;gt; 'Place',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Prize' =&amp;gt; 'Prize', &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Bowler' =&amp;gt; 'Bowler',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Series' =&amp;gt; 'Series',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Average' =&amp;gt; 'Average',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Handicap' =&amp;gt; 'Handicap',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Game1' =&amp;gt; 'Game1',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Game2' =&amp;gt; 'Game2',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Game3' =&amp;gt; 'Game3',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Game4' =&amp;gt; 'Game4',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Season' =&amp;gt; 'Season'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $belongs_many_many = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Season' =&amp;gt; 'SeasonPage'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $searchable_fields = array (&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Season.ID' =&amp;gt; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'title' =&amp;gt; 'Season'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function getCMSFields() &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields = parent::getCMSFields();&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab(&quot;Root.Main&quot;, new TextField('Place', 'Place'));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab(&quot;Root.Main&quot;, new TextField('Prize', 'Prize'));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab(&quot;Root.Main&quot;, new TextField('Bowler', 'Bowler'));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab(&quot;Root.Main&quot;, new TextField('Series', 'Series'));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab(&quot;Root.Main&quot;, new TextField('Average', 'Average'));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab(&quot;Root.Main&quot;, new TextField('Handicap', 'Handicap'));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab(&quot;Root.Main&quot;, new TextField('Game1', 'Game1'));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab(&quot;Root.Main&quot;, new TextField('Game2', 'Game2'));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab(&quot;Root.Main&quot;, new TextField('Game3', 'Game3'));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab(&quot;Root.Main&quot;, new TextField('Game4', 'Game4'));&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;// Season&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$Season = DataObject::get('SeasonPage');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab(&quot;Root.Season&quot;, new CheckboxsetField('Season', 'Season', $Season));&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $fields;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;It belongs many many to SeasonPage.&lt;/p&gt;&lt;p&gt;class SeasonPage extends Page &lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $many_many = array(&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;'Standings' =&amp;gt; 'Standing'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $allowed_children = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'none' =&amp;gt; 'none'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;class SeasonPage_Controller extends Page_Controller &lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Return the list of standings for this season&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public function getStandingsList()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $this-&amp;gt;Standings(Null, 'Place ASC');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;What I need is to upload a csv file containing each seasons standings. This seems to work fine except that the standings are not relating to a SeasonPage. If I manually relate the standings to a season then export a csv it shows 2012[] in the Season column. But if I try to import a csv with 2012[] in the Season column the standings don't relate to a SeasonPage.&lt;br /&gt;Any help would be greatly appreciated.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: [SOLVED] Data object belongs_many_many, no relation after csv import | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19618&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19618&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Thu, 05 Apr 2012 10:03:01 +1200</pubDate>
			<dc:creator>MattIn4D</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19618</guid>
		</item>
		
		<item>
			<title>Re: [SOLVED] 500 Error: &quot;Uncaught Exception: Object-&gt;__call(): the method &#39;parent&#39; does not exist on...</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19596#post313032</link>
			<description>&lt;p&gt;Sorted. &lt;/p&gt;&lt;p&gt;Rather than a Page(), I should have tried to create a TrainerPage()&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: [SOLVED] 500 Error: &amp;quot;Uncaught Exception: Object-&amp;gt;__call(): the method &amp;#39;parent&amp;#39; does not exist on... | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19596#post313032&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19596&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 03 Apr 2012 15:26:03 +1200</pubDate>
			<dc:creator>_Vince</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19596#post313032</guid>
		</item>
		
		<item>
			<title>[SOLVED] 500 Error: &quot;Uncaught Exception: Object-&gt;__call(): the method &#39;parent&#39; does not exist on...</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19596</link>
			<description>&lt;p&gt;I'm having a bit of a problem with this. &lt;/p&gt;&lt;p&gt;Basically, I want to have a dataobject, &quot;Trainer&quot;. Each trainer has their own page on the site. The trainers must be able to log in, so I thought to extend the Member class.&lt;/p&gt;&lt;p&gt;When the Trainer record is created, a Page would be created for the trainer as well. And yet, I can't get it to work. I always get &lt;/p&gt;&lt;p&gt;ERROR [User Error]: Uncaught Exception: Object-&amp;gt;__call(): the method 'parent' does not exist on 'TrainerPage'&lt;br /&gt;IN POST /allactive/admin/Data/Trainer/16/EditForm?action_doSave=Save&lt;br /&gt;Line 724 in /var/www/allactive/sapphire/core/Object.php&lt;/p&gt;&lt;p&gt;Can anybody tell me what I've done wrong?&lt;/p&gt;&lt;p&gt;Here's the code for TrainerPage. &lt;/p&gt;&lt;p&gt;&amp;lt;?php&lt;br /&gt;class TrainerPage extends SiteTree{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $has_one = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;Trainer&quot; =&amp;gt; &quot;Trainer&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;class TrainerPage_Controller extends Page_Controller{&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;and Trainer: &lt;/p&gt;&lt;p&gt;&amp;lt;?php&lt;br /&gt;class Trainer extends Member{&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $db = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;TR_LandlineNumber&quot; =&amp;gt; &quot;Varchar(20)&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;TR_MobileNumber&quot; =&amp;gt; &quot;Varchar(20)&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;TR_Notes&quot; =&amp;gt; &quot;Text&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $has_one = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;TR_Area&quot; =&amp;gt; &quot;Area&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;TR_Region&quot; =&amp;gt; &quot;Region&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $has_many = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;Client&quot; =&amp;gt; &quot;Client&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;    function getCMSFields() {&lt;/p&gt;&lt;p&gt;        $sqlQuery = new SQLQuery(array(&quot;ID&quot;, &quot;AreaDescription&quot;), &quot;Area&quot;);&lt;br /&gt;        $AreaMap = $sqlQuery-&amp;gt;execute()-&amp;gt;map();&lt;/p&gt;&lt;p&gt;        $sqlQuery = new SQLQuery(array(&quot;ID&quot;, &quot;RegionDescription&quot;), &quot;Region&quot;);&lt;br /&gt;        $RegionMap = $sqlQuery-&amp;gt;execute()-&amp;gt;map();&lt;/p&gt;&lt;p&gt;        $fields = parent::getCMSFields();&lt;br /&gt;        $fields-&amp;gt;RemoveFieldFromTab( 'Root.Main', &quot;DateFormat&quot;);&lt;br /&gt;        $fields-&amp;gt;RemoveFieldFromTab( 'Root.Main', &quot;TimeFormat&quot;);&lt;br /&gt;        $fields-&amp;gt;RemoveFieldFromTab( 'Root.Main', &quot;TR_AreaID&quot;);&lt;br /&gt;        $fields-&amp;gt;RemoveFieldFromTab( 'Root.Main', &quot;TR_RegionID&quot;);&lt;br /&gt;        $fields-&amp;gt;RemoveFieldFromTab( 'Root.Main', &quot;TR_Notes&quot;);&lt;br /&gt;        $fields-&amp;gt;RemoveFieldFromTab( 'Root.Main', &quot;TR_LandlineNumber&quot;);&lt;br /&gt;        $fields-&amp;gt;RemoveFieldFromTab( 'Root.Main', &quot;TR_MobileNumber&quot;);&lt;/p&gt;&lt;p&gt;        $fields-&amp;gt;addFieldToTab( 'Root.Main', new TextField(&quot;TR_LandlineNumber&quot;, &quot;Landline Number&quot;));&lt;br /&gt;        $fields-&amp;gt;addFieldToTab( 'Root.Main', new TextField(&quot;TR_MobileNumber&quot;, &quot;Mobile Number&quot;));&lt;br /&gt;        $fields-&amp;gt;addFieldToTab( 'Root.Main', new TextareaField(&quot;TR_Notes&quot;, &quot;Notes&quot;));&lt;br /&gt;        $fields-&amp;gt;addFieldToTab( 'Root.Main', new ListboxField(&quot;TR_RegionID&quot;, &quot;Region&quot;, $RegionMap));&lt;br /&gt;        $fields-&amp;gt;addFieldToTab( 'Root.Main', new ListboxField(&quot;TR_AreaID&quot;, &quot;Area&quot;, $AreaMap));&lt;/p&gt;&lt;p&gt;        return $fields;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function onBeforeWrite(){&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// TODO: check if the page already exists&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;parent::onBeforeWrite();&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;$newTrainerPage = new Page();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$newTrainerPage-&amp;gt;ClassName = &quot;TrainerPage&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$newTrainerPage-&amp;gt;Created = time();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$newTrainerPage-&amp;gt;LastEdited = time();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$newTrainerPage-&amp;gt;Title = $this-&amp;gt;Surname . &quot; &quot; . $this-&amp;gt;FirstName;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$newTrainerPage-&amp;gt;URLSegment = strtolower($this-&amp;gt;Surname . &quot;-&quot; . $this-&amp;gt;FirstName);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$newTrainerPage-&amp;gt;ShowInMenus = 1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$newTrainerPage-&amp;gt;ShowInSearch = 1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$newTrainerPage-&amp;gt;CanEditType = &quot;Inherit&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$newTrainerPage-&amp;gt;CanViewType = &quot;Inherit&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$newTrainerPage-&amp;gt;Status = &quot;Published&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$ID = $newTrainerPage-&amp;gt;write();&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$newTrainerPage-&amp;gt;publish(&quot;Stage&quot;, &quot;Live&quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: [SOLVED] 500 Error: &amp;quot;Uncaught Exception: Object-&amp;gt;__call(): the method &amp;#39;parent&amp;#39; does not exist on... | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19596&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19596&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Mon, 02 Apr 2012 08:49:34 +1200</pubDate>
			<dc:creator>_Vince</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19596</guid>
		</item>
		
		<item>
			<title>Re: has_one and has_many relationship saving in a CTF</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19575#post313009</link>
			<description>&lt;p&gt;do you mean, you create an event, and then without saving add the dates and then save?&lt;br /&gt;I think SS should handle that for you.&lt;/p&gt;&lt;p&gt;if not you can use on BeforeWrite function ... for example I use the following function to save the Parents ParentID.&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;function onBeforeWrite() {&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;$r = DB::query(&quot;SELECT ParentID FROM SiteTree WHERE ID = &quot;.$this-&amp;gt;ParentID);&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;$this-&amp;gt;CityPageID = $r-&amp;gt;value();&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;parent::onBeforeWrite();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: has_one and has_many relationship saving in a CTF | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19575#post313009&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19575&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Sun, 01 Apr 2012 23:14:36 +1200</pubDate>
			<dc:creator>danzzz</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19575#post313009</guid>
		</item>
		
		<item>
			<title>has_one and has_many relationship saving in a CTF</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19575</link>
			<description>&lt;p&gt;I have an Event dataobject and a DateTime dataobject. The Event has a $has_many for &quot;Showtimes&quot; =&amp;gt; &quot;DateTime&quot; and the DateTime has a $has_one for &quot;Event&quot; =&amp;gt; &quot;Event&quot;. I have these in a CTF in ModelAdmin. Right now I can create a new Event and if I add the Event then add DateTimes, everything works. The DateTimes get the EventID field populated correctly because the Event already exists in the database.&lt;/p&gt;&lt;p&gt;In the more likely case, a user will create a new Event, add a title, etc... then try to add some DateTimes. Since the Event does not exist in the database, there is no ID to populate EventID in the DateTimes so it gets set to 0.&lt;/p&gt;&lt;p&gt;Should Silverstripe handle this automatically? Is there any way to have it so the user does not need to add an Event before adding DateTimes?&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: has_one and has_many relationship saving in a CTF | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19575&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19575&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Fri, 30 Mar 2012 03:48:11 +1300</pubDate>
			<dc:creator>copernicus</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19575</guid>
		</item>
		
		<item>
			<title>Re: Adding Comments to DataObjects</title>
			<link>http://www.silverstripe.org/data-model-questions/show/16283?start=16#post312947</link>
			<description>&lt;p&gt;The comments module is live and working in 3.0 (apart from moderation and ajax posting) but not sure what you mean by integrate with the wordpress blog comments? There's currently no importer or exporter for comments and nothing on the roadmap for it.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Adding Comments to DataObjects | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/16283?start=16#post312947&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/16283&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Wed, 28 Mar 2012 19:19:12 +1300</pubDate>
			<dc:creator>Willr</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/16283?start=16#post312947</guid>
		</item>
		
		<item>
			<title>Re: Adding Comments to DataObjects</title>
			<link>http://www.silverstripe.org/data-model-questions/show/16283?start=16#post312939</link>
			<description>&lt;p&gt;Any updates on this? Would love to be able to differentiate between data objects. &lt;/p&gt;&lt;p&gt;We currently have wordpress blogs on our site - could the new comments system for Silverstripe 3.0 be easily integrated with this or would it require a messy work around? &lt;/p&gt;&lt;p&gt;How long a wait are we looking at?&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Adding Comments to DataObjects | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/16283?start=16#post312939&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/16283&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Wed, 28 Mar 2012 06:03:43 +1300</pubDate>
			<dc:creator>PokerVIP</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/16283?start=16#post312939</guid>
		</item>
		
		<item>
			<title>Re: jquerymobile Weirdness - editor issue</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19222#post312937</link>
			<description>&lt;p&gt;I can verify that I have the same troubles as tazzy.&lt;/p&gt;&lt;p&gt;Seems the base href default functionality in SilverStripe is rather limiting in this case. I'm not sure how to get around the issue, without major overhauls to the way the WYSIWYG outputs file paths.&lt;/p&gt;&lt;p&gt;Any ideas anyone?&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: jquerymobile Weirdness - editor issue | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19222#post312937&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19222&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Wed, 28 Mar 2012 04:50:03 +1300</pubDate>
			<dc:creator>bembo99</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19222#post312937</guid>
		</item>
		
		<item>
			<title>Filtering a DataObjectSet by range query?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19548</link>
			<description>&lt;p&gt;Hi,&lt;br /&gt;we are developing a website with SS 3 and selfwritten DataObjects. One of them holds two dates, marking a start date and an end date for events. Somehow, we need to filter the whole set of DataObjects to receive all currently active eventy (such that start date &amp;lt; current date &amp;lt; end date). The given filter() function can only compare using equality, but not ranges... Is the only way to solve this using completely a selfwritten query?&lt;br /&gt;Sunny greetings&lt;br /&gt;Nico&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Filtering a DataObjectSet by range query? | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19548&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19548&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Sat, 24 Mar 2012 04:20:07 +1300</pubDate>
			<dc:creator>NicoHaase</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19548</guid>
		</item>
		
		<item>
			<title>Re: Unit Tests and Model Building</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19537#post312878</link>
			<description>&lt;p&gt;You could try the ?flush with your test runner - dev/tests/all?flush=all. If that doesn't work I'd double check you aren't referencing that code anywhere. What's the error message?&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Unit Tests and Model Building | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19537#post312878&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19537&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Fri, 23 Mar 2012 19:29:53 +1300</pubDate>
			<dc:creator>Willr</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19537#post312878</guid>
		</item>
		
		<item>
			<title>Disable publish button?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19546</link>
			<description>&lt;p&gt;Is it possible to disable the publish button in the cms for a page?&lt;/p&gt;&lt;p&gt;Reason for that is, that i don't want specific pages to be published because they are only used as entries for the parent page.&lt;br /&gt;This means also that these entries resp. pages should not be callable showed in the browser by url.&lt;/p&gt;&lt;p&gt;Greetings&lt;br /&gt;Bundschuh&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Disable publish button? | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19546&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19546&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Fri, 23 Mar 2012 05:35:54 +1300</pubDate>
			<dc:creator>Bundschuh</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19546</guid>
		</item>
		
		<item>
			<title>Trouble adding has_many children</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19545</link>
			<description>&lt;p&gt;Hi all&lt;/p&gt;&lt;p&gt;Bit of a newbie question, I'm sure, but I just can't find a solution to this problem.  I suspect it's something I'm doing wrong but...&lt;/p&gt;&lt;p&gt;OK, I have a parent class with a has_many relationship with a child class.  SilverStripe/Sapphire creates the tables correctly but I'm not able to insert any child objects into the database using SS.  The steps I'm expecting to work for me are...&lt;/p&gt;&lt;p&gt;1. create new Parent object&lt;br /&gt;2. get Children component set&lt;br /&gt;3. create Child objects and use add() to add them to Children&lt;br /&gt;4. call write() on Parent to write Parent and Children to database&lt;/p&gt;&lt;p&gt;I'm not getting any error messages that I can find but nor am I getting any Child objects inserted into the database.  I've done my best to find useful example code, read the documentation, etc. but I'm just stuck.&lt;/p&gt;&lt;p&gt;Could someone please point me at a complete example of achieving the above or highlight where I'm going wrong?&lt;/p&gt;&lt;p&gt;Thanks in advance&lt;br /&gt;Simon&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Trouble adding has_many children | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19545&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19545&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Fri, 23 Mar 2012 03:23:30 +1300</pubDate>
			<dc:creator>sdc395</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19545</guid>
		</item>
		
		<item>
			<title>Re: Unit Tests and Model Building</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19537#post312858</link>
			<description>&lt;p&gt;I am actually running the tests in my browser, so is there a flush that I need to do for the tests via the browser besides `/dev/build/?flush=all` ?&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Unit Tests and Model Building | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19537#post312858&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19537&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Fri, 23 Mar 2012 02:33:16 +1300</pubDate>
			<dc:creator>mikelbring</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19537#post312858</guid>
		</item>
		
		<item>
			<title>Re: Unit Tests and Model Building</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19537#post312851</link>
			<description>&lt;p&gt;Are you running the tests via cli? If so then you need to also flush that. SilverStripe mantains 2 caches, a web cache and a cli one. So you if you a flush=all in a webbrowser it doesn't clear the cli version.&lt;/p&gt;&lt;p&gt;Via sake you can do sake dev/tests/all flush=all&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Unit Tests and Model Building | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19537#post312851&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19537&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Thu, 22 Mar 2012 18:47:59 +1300</pubDate>
			<dc:creator>Willr</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19537#post312851</guid>
		</item>
		
		<item>
			<title>Unit Tests and Model Building</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19537</link>
			<description>&lt;p&gt;I renamed a model file and do a `/dev/build/?flush=all` and it works fine for the live site, however my unit tests still want to load the old model file, although I am not using this model anywhere on the live site or in my unit tests. Do I need to run a separate build for unit tests? I cannot  find anything regarding this.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Unit Tests and Model Building | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19537&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19537&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Thu, 22 Mar 2012 10:16:46 +1300</pubDate>
			<dc:creator>mikelbring</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19537</guid>
		</item>
		
		<item>
			<title>Decorating DataObjectSet?</title>
			<link>http://www.silverstripe.org/data-model-questions/show/19448</link>
			<description>&lt;p&gt;Hey, this is my first post so be nice!&lt;/p&gt;&lt;p&gt;A site that I've been working on has portfolio pieces stored as DataObjects, each with a relevant image.  These are getting pulled to the template and shown in a widget, but the aim has been to show a random 4 logos, rather than 4 from a specifically sorted set.&lt;/p&gt;&lt;p&gt;Being somewhat averse to using mySQL's &quot;RAND()&quot; function in a query, I figured the best way of doing it would be to initialize the full set of DataObjects and then use a shuffle function (which for some reason isn't in the core DataObjectSet class).  Unfortunately decorating the class and using:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;public function Shuffle() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;shuffle($this-&amp;gt;owner-&amp;gt;items);&lt;br /&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Throws up the error:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;[Notice] Indirect modification of overloaded property DataObjectSet::$items has no effect&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;I wondered if anyone could explain why this was and how one would go about decorating the class correctly (if at all)?&lt;/p&gt;&lt;p&gt;(FYI, I managed to achieve what I wanted by extending DataObjectSet, but wondered why decorating wasn't working)&lt;/p&gt;&lt;p&gt;Cheers!&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Decorating DataObjectSet? | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/19448&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/19448&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Sat, 10 Mar 2012 05:35:46 +1300</pubDate>
			<dc:creator>fatlewis</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/19448</guid>
		</item>
		
		<item>
			<title>Re: Duplicate page should duplicate and link dataobjects</title>
			<link>http://www.silverstripe.org/data-model-questions/show/17342?start=8#post312401</link>
			<description>&lt;p&gt;yes, exactly. it just checks for the key of the relationship.&lt;/p&gt;&lt;p&gt;glad, if that works for you.&lt;/p&gt;&lt;p&gt;be careful in any production environment, though.&lt;br /&gt;as this is not too much tested yet  &lt;img src='http://www.silverstripe.org/sapphire/images/smilies/smile.gif'&gt; &lt;/p&gt;&lt;p&gt;i thought something like that would also be a nice core feature,&lt;br /&gt;so that you could have&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;public static $relations_to_copy = array(&lt;br /&gt;  'myImages',&lt;br /&gt;  'myGeoObjects'&lt;br /&gt;);&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;on any Page ?&lt;/p&gt;&lt;p&gt;..just my 2 cents.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Duplicate page should duplicate and link dataobjects | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/17342?start=8#post312401&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/17342&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Wed, 07 Mar 2012 10:59:57 +1300</pubDate>
			<dc:creator>max5k</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/17342?start=8#post312401</guid>
		</item>
		
		<item>
			<title>Re: Duplicate page should duplicate and link dataobjects</title>
			<link>http://www.silverstripe.org/data-model-questions/show/17342?start=8#post312348</link>
			<description>&lt;p&gt;So for instance if i have&lt;/p&gt;&lt;p&gt;public static $has_many = array(&lt;br /&gt;'Images' =&amp;gt; 'Image',&lt;br /&gt;'Employees' =&amp;gt; 'DataObject'&lt;br /&gt;);&lt;/p&gt;&lt;p&gt;then i should use&lt;/p&gt;&lt;p&gt;$items_to_duplicate = array(&lt;br /&gt;'Images',&lt;br /&gt;'Employees' //anything you want to duplicate&lt;br /&gt;);&lt;/p&gt;&lt;p&gt;Or?&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Duplicate page should duplicate and link dataobjects | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/17342?start=8#post312348&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/17342&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 06 Mar 2012 21:25:11 +1300</pubDate>
			<dc:creator>Nobrainer Web</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/17342?start=8#post312348</guid>
		</item>
		
		<item>
			<title>Re: Duplicate page should duplicate and link dataobjects</title>
			<link>http://www.silverstripe.org/data-model-questions/show/17342#post312347</link>
			<description>&lt;p&gt;you might want to add a filter, which relations to duplicate&lt;br /&gt;the above version does a little too much in some cases...&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;public function duplicate() {&lt;/p&gt;&lt;p&gt;    $items_to_duplicate = array(&lt;br /&gt;        'Images'  //anything you want to duplicate&lt;br /&gt;    );&lt;/p&gt;&lt;p&gt;    $page = parent::duplicate();&lt;/p&gt;&lt;p&gt;    //duplicate has many items&lt;br /&gt;    foreach ($this-&amp;gt;has_many() as $key =&amp;gt; $className) {&lt;br /&gt;      if (in_array($key, $items_to_duplicate)) {&lt;br /&gt;        foreach ($this-&amp;gt;{$key}() as $item) {&lt;br /&gt;          $newField = $item-&amp;gt;duplicate();&lt;br /&gt;          $id = get_class($this) . 'ID';&lt;br /&gt;          $newField-&amp;gt;{$id} = $page-&amp;gt;ID;&lt;br /&gt;          $newField-&amp;gt;write();&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;    }&lt;/p&gt;&lt;p&gt;    //duplicate many_many items&lt;br /&gt;    foreach ($this-&amp;gt;many_many() as $key =&amp;gt; $className) {&lt;br /&gt;      if (in_array($key, $items_to_duplicate)) {&lt;br /&gt;        $page-&amp;gt;{$key}()-&amp;gt;addMany($this-&amp;gt;{$key}()-&amp;gt;getIdList());&lt;br /&gt;      }&lt;br /&gt;    }&lt;/p&gt;&lt;p&gt;    return $page;&lt;br /&gt;  }&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Duplicate page should duplicate and link dataobjects | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/17342#post312347&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/17342&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 06 Mar 2012 21:19:45 +1300</pubDate>
			<dc:creator>max5k</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/17342#post312347</guid>
		</item>
		
		<item>
			<title>Re: Duplicate page should duplicate and link dataobjects</title>
			<link>http://www.silverstripe.org/data-model-questions/show/17342#post312346</link>
			<description>&lt;p&gt;Thank you so much for posting this max5k, this has gone in to my SilverStripe package that i put on all new sites.&lt;br /&gt;So usefull!&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Duplicate page should duplicate and link dataobjects | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/17342#post312346&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/17342&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 06 Mar 2012 20:55:47 +1300</pubDate>
			<dc:creator>Nobrainer Web</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/17342#post312346</guid>
		</item>
		
		<item>
			<title>Re: Duplicate page should duplicate and link dataobjects</title>
			<link>http://www.silverstripe.org/data-model-questions/show/17342#post312336</link>
			<description>&lt;p&gt;great, thanks for that one.&lt;/p&gt;&lt;p&gt;this is what i ended up with:&lt;/p&gt;&lt;p&gt; duplicate all has_many and many_many relationships of a page dynamically...:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;public function duplicate() {&lt;/p&gt;&lt;p&gt;    $page = parent::duplicate();&lt;/p&gt;&lt;p&gt;    //duplicate has many items&lt;br /&gt;    foreach ($this-&amp;gt;has_many() as $key =&amp;gt; $className) {&lt;br /&gt;      foreach ($this-&amp;gt;{$key}() as $item) {&lt;br /&gt;        $newField = $item-&amp;gt;duplicate();&lt;br /&gt;        $id = get_class($this) . 'ID';&lt;br /&gt;        $newField-&amp;gt;{$id} = $page-&amp;gt;ID;&lt;br /&gt;        $newField-&amp;gt;write();&lt;br /&gt;      }&lt;br /&gt;    }&lt;/p&gt;&lt;p&gt;    //duplicate many_many items&lt;br /&gt;    foreach( $this-&amp;gt;many_many() as $key =&amp;gt; $className ){&lt;br /&gt;      $page-&amp;gt;{$key}()-&amp;gt;addMany($this-&amp;gt;{$key}()-&amp;gt;getIdList());&lt;br /&gt;    }&lt;/p&gt;&lt;p&gt;    return $page;&lt;br /&gt;  }&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;cheers&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Duplicate page should duplicate and link dataobjects | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/17342#post312336&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/17342&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 06 Mar 2012 11:19:37 +1300</pubDate>
			<dc:creator>max5k</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/17342#post312336</guid>
		</item>
		
		<item>
			<title>Re: Problem creating TreeMultiselectField to look up Page</title>
			<link>http://www.silverstripe.org/data-model-questions/show/5844?start=8#post312325</link>
			<description>&lt;p&gt;@All,  Thanks for sharing. &lt;/p&gt;&lt;p&gt;@Aaron,  Did you got any solution to make this work with TreeMultiselectField custom page list? &lt;/p&gt;&lt;p&gt;my code is working great with &quot;CheckboxSetField&quot;. But not working with TreeMultiselectField in case of custom page list &quot;NewsPage&quot;.&lt;/p&gt;&lt;p&gt;My working Code with &quot;CheckboxSetField&quot;:&lt;br /&gt;------------------------------------------------------------&lt;br /&gt;public  static $many_many = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;FeaturedArticle&quot;=&amp;gt;&quot;NewsPage&quot;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/p&gt;&lt;p&gt; public function getCMSFields() {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields = parent::getCMSFields();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$pageList = DataObject::get('NewsPage'); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;        $f = parent::getCMSFields();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;$f-&amp;gt;addFieldsToTab(&quot;Root.Content.FeaturedArticle&quot;, array(&lt;br /&gt;            new CheckboxSetField(&quot;FeaturedArticle&quot;, &quot;Choose a your featured article:&quot;, $pageList),            &lt;br /&gt;        ));&lt;/p&gt;&lt;p&gt;  return $f;&lt;br /&gt;}   &lt;br /&gt;------------------------------------------------------------&lt;/p&gt;&lt;p&gt;Though when I use &quot;TreeMultiselectField &quot; this with &quot;SiteTree&quot; it works.&lt;/p&gt;&lt;p&gt;working Code with SiteTree is :&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public  static $many_many = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;FeaturedArticle&quot;=&amp;gt;&quot;SiteTree&quot;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/p&gt;&lt;p&gt; public function getCMSFields() {&lt;/p&gt;&lt;p&gt;  $f = parent::getCMSFields();&lt;br /&gt;        $f-&amp;gt;addFieldsToTab(&quot;Root.Content.FeaturedArticle&quot;, array(&lt;br /&gt;            new TreeMultiSelectField(&quot;FeaturedArticle&quot;, &quot;Choose a your featured article:&quot;, &quot;SiteTree&quot;),            &lt;br /&gt;        ));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;Any idea why it is not working with &quot;NewsPage&quot; class in TreeMultiselectField ?&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;Posted to: Problem creating TreeMultiselectField to look up Page | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/show/5844?start=8#post312325&quot; class=&quot;showLink&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/data-model-questions/reply/5844&quot; class=&quot;replyLink&quot;&gt;Post Reply&lt;/a&gt;&lt;/p&gt;
</description>
			<pubDate>Tue, 06 Mar 2012 03:05:25 +1300</pubDate>
			<dc:creator>Bureau Berg</dc:creator>
			<guid>http://www.silverstripe.org/data-model-questions/show/5844?start=8#post312325</guid>
		</item>
		

	</channel>
</rss>
