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

		
		<item>
			<title>Re: ManyMany Complex Table Field  -- Setting Default Checked Checkboxes</title>
			<link>http://www.silverstripe.org/archive/show/127181?start=0#post149246</link>
			<description>&lt;p&gt;Hi RNHurt!&lt;/p&gt;&lt;p&gt;Sorry that I took so long to answer your question!&lt;br /&gt;Well, I think what you have in mind is something completely different than my FAQ.&lt;br /&gt;I have actually build something very untypical, for that my FAQ looks more like an Forum.&lt;br /&gt;You can make up themes and Subthemes and make your FAQ posts there.&lt;br /&gt;The main idea was to make an FAQ that we in our development Team can make entries to specific themes, so if another one has the same issue he can look it up fast.&lt;br /&gt;An FAQ like you see it on most of the Pages with a list of about 10 questions and beneath all the Question/Answer pairs, with the back to top links etc. isn't what I had to develop. &lt;/p&gt;&lt;p&gt;But if you have some more infos in what your problem is, I can try to help you.&lt;/p&gt;&lt;p&gt;For now I would suggest to make one Page that &quot;holds&quot; all the FAQ entries.&lt;br /&gt;So you can easly list them on top and afterward make a clear Template for them.&lt;br /&gt;For example:&lt;/p&gt;&lt;p&gt;MyFAQ&lt;br /&gt;---Question1&lt;br /&gt;---Question2&lt;br /&gt;---Question3&lt;br /&gt;---...etc&lt;/p&gt;&lt;p&gt;So that MyFAQ is the Parent.&lt;br /&gt;Now you can use the MyFAQ.ss to &amp;lt;% control Children %&amp;gt; and firstly give out a list of Questions with the link to them.&lt;br /&gt;and afterwards another control to give out the complete Question/Answer pair.&lt;br /&gt;So you could work with anchors in your templates that makes it easy to jump around in the site.&lt;/p&gt;&lt;p&gt;Could I help you with this?&lt;/p&gt;&lt;p&gt;Best wishes,&lt;br /&gt;Daminipo&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: ManyMany Complex Table Field  -- Setting Default Checked Checkboxes &lt;a href=&quot;http://www.silverstripe.org/archive/show/127181?start=0#post149246&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/127181?start=0#post149246&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 20 Aug 2008 02:42:22 +1200</pubDate>
			<dc:creator>Daminipo</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/127181?start=0#post149246</guid>
		</item>
		
		<item>
			<title>Re: ManyMany Complex Table Field  -- Setting Default Checked Checkboxes</title>
			<link>http://www.silverstripe.org/archive/show/127181?start=0#post139018</link>
			<description>&lt;p&gt;I have been thinking about a FAQ page for a couple of weeks now but haven't had time/energy to do anything about it.  I don't know anything about &quot;ThemeHolder&quot; but what I'm looking for is a simple way to make a FAQ page and have it look good/consistent.  My problem with building FAQ pages manually is that it is quite a few anchor links (&quot;back to top&quot;, down to each question, etc.) and its difficult to get everything working and looking good.  Are you trying to solve this problem or something else?&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: ManyMany Complex Table Field  -- Setting Default Checked Checkboxes &lt;a href=&quot;http://www.silverstripe.org/archive/show/127181?start=0#post139018&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/127181?start=0#post139018&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Sun, 10 Aug 2008 07:07:09 +1200</pubDate>
			<dc:creator>RNHurt</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/127181?start=0#post139018</guid>
		</item>
		
		<item>
			<title>Re: ManyMany Complex Table Field  -- Setting Default Checked Checkboxes</title>
			<link>http://www.silverstripe.org/archive/show/127181?start=0#post131695</link>
			<description>&lt;p&gt;Well... finally I got the answer to my Problem. In any case someone is interessted what I've done  let you know here:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;class Faq extends Page&lt;br /&gt;{&lt;br /&gt;...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $many_many = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;'Themes'&lt;/strong&gt; =&amp;gt; 'ThemeHolder' //Relations name is &quot;Themes&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;br /&gt;        protected $myThemeArray = array();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;protected $myString = &quot;&quot;;&lt;br /&gt;...&lt;br /&gt;//WHATCH OUT: The function &lt;strong&gt;onAfterWrite()&lt;/strong&gt; is only useable when you use the Daily builds, it's not included in the Version 2.2.2&lt;br /&gt;        function onAfterWrite()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$myID = $this-&amp;gt;ParentID;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$this-&amp;gt;getMyParents($myID);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$myThemes = $this-&amp;gt;&lt;strong&gt;Themes()&lt;/strong&gt;; //be shure to use the Name here you gave your many_many relation before&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$myThemes-&amp;gt;addMany($this-&amp;gt;myThemeArray);&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::onAfterWrite();&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 getMyParents($myID)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( DataObject::get_by_id('SiteTree', $myID))&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;$myObj = DataObject::get_by_id('SiteTree', $myID);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;if( $myObj-&amp;gt;ClassName != 'FaqHolder' )&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$myThemeID = $myObj-&amp;gt;ID;&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;$this-&amp;gt;myThemeArray[] = $myThemeID;&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;foreach($this-&amp;gt;myThemeArray as $PID)&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;{&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;$this-&amp;gt;myString .= $PID;&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;}&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;$myParentID = $myObj-&amp;gt;ParentID;&lt;/p&gt;&lt;p&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;$this-&amp;gt;getMyParents($myParentID);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;...&lt;br /&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;As you hoefully have noticed is that the Function &lt;strong&gt;onAfterWrite()&lt;/strong&gt; is beeing used. This is only availeble when you use the Daily builds. I don't know since when it isicluded, just use the newest one.&lt;br /&gt;;-)&lt;/p&gt;&lt;p&gt;--&amp;gt;&lt;a href=&quot;http://dailybuilds.silverstripe.com/core-tarballs/&quot;&gt;http://dailybuilds.silverstripe.com/core-tarballs/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The problem was that with the function on&lt;strong&gt;Before&lt;/strong&gt;Write() you are unable to use $this-&amp;gt;ID or $this-&amp;gt;ParentID, because the actual entry hasn't been made yet, as you are &lt;strong&gt;Before&lt;/strong&gt; the writing progress...&lt;/p&gt;&lt;p&gt;That way I have all my Themes Selected by default, even when someone deselects them, they will be there the next time he visits the Many_Many Table. &lt;/p&gt;&lt;p&gt;If anyone is interested in the FAQ Module I'm creating just let me know.&lt;br /&gt; &lt;img src='http://www.silverstripe.org/sapphire/images/smilies/smile.gif'&gt; &lt;/p&gt;&lt;p&gt;Cheers,&lt;br /&gt;Daminipo&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: ManyMany Complex Table Field  -- Setting Default Checked Checkboxes &lt;a href=&quot;http://www.silverstripe.org/archive/show/127181?start=0#post131695&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/127181?start=0#post131695&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 30 Jul 2008 04:03:49 +1200</pubDate>
			<dc:creator>Daminipo</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/127181?start=0#post131695</guid>
		</item>
		
		<item>
			<title>ManyMany Complex Table Field  -- Setting Default Checked Checkboxes</title>
			<link>http://www.silverstripe.org/archive/show/127181#post127181</link>
			<description>&lt;p&gt;Hello!&lt;/p&gt;&lt;p&gt;If got a problem with the ManyManyComplexTableField.&lt;br /&gt;I'm trying to find out how to make certain Entries constantly checked.&lt;/p&gt;&lt;p&gt;I have a Pagetype &quot;Faq&quot; that is always Child of &quot;ThemeHolder&quot;.&lt;br /&gt;&quot;Faq&quot; represents an Question-Answer pair that was made.&lt;br /&gt;&quot;ThemeHolder&quot; represents the Themes that the Faq entry can belong to. &lt;br /&gt;In the ManyMany ComplexTableField theres a List of all &quot;ThemeHolders&quot; and you can correlate &quot;Faq&quot; with multiple &quot;ThemeHolders&quot;.&lt;/p&gt;&lt;p&gt;Now I want that the &quot;ThemeHolder&quot; that is the parent to &quot;Faq&quot; is always checked and is not to change by the CMS user.&lt;br /&gt;All the other ones can be checked or unchecked as normal but this one correlation has to be always there, otherwise it makes no sense.&lt;br /&gt;Cause I want to make it possible that a Faq entry is able to correspond to many Themes, but the Theme it is Child of should always be checked and unable to get unchecked.&lt;/p&gt;&lt;p&gt;Is there anyone who might can help me with this Problem?&lt;br /&gt;I would be very thankful!&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: ManyMany Complex Table Field  -- Setting Default Checked Checkboxes &lt;a href=&quot;http://www.silverstripe.org/archive/show/127181#post127181&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/show/127181#post127181&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 23 Jul 2008 00:56:41 +1200</pubDate>
			<dc:creator>Daminipo</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/127181#post127181</guid>
		</item>
		

	</channel>
</rss>