Hi Ola, You're on the right way.
Indeed the selectionsource should be like cocoon://some/source/pipeline. Let's make it cocoon://extensions/project-specific/mailgroupselectionsource I assume you already have a CMS customized project with extension mechanism [1]. Create a folder "project-specific" inside the "extensions" folder. Add the attached "sitemap.xmap" to the new "project-specific" folder. Now you only have to write an XSL transformation that transforms the current XML from http://localhost:500000/extensions/project-specific/mailgroupselectionso urce into a valid selectionsource for your picker. The XML structure for a nodetree is <nodes> <node id="" value=""/> <node id="" value=""/> </nodes> The id attribute can be filled with mailgroup/@mailgroup_id. The value attribute can be filled with mailgroup/name. You don't need flowscript for this. All mailgroups can be fetched with the mailgroups generator that is configured in the attached sitemap. [1] http://www.hippocms.org/display/CMS/08.+Extending+Hippo+CMS Jasha Joachimsthal www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > ajankowska > Sent: dinsdag 5 augustus 2008 14:20 > To: 'Hippo CMS development public mailinglist' > Subject: [HippoCMS-dev] using database table as source for > dynamic list > > Hi > > > > I have still problems to get mailing groups in the template > > I have created rule > > <rule for="/document/content/form/mailgroup"> > > <selectionsource src="cocoon://some/source/pipeline" > type="nodetree" > dynamic="true"/> > > </rule> > > > > And don't know what should be the source > > > > In the hcamanager\newsletter\forms I have found xml's that > create and edit mailgroups > > > > <fb:context xmlns="http://apache.org/cocoon/forms/1.0#binding" > xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" path="/"> > > <fb:value id="name" path="name"/> > > <fb:value id="description" path="description"/> > > <fb:value id="domain" path="domain"/> > > <fb:value id="allowSubscriptionByUser" > path="allowSubscriptionByUser"/> > > </fb:context> > > > > Should I create pipeline to get information from database? > > I just need to have list of all names there. > > > > Regards, > > Ola > > ******************************************** > Hippocms-dev: Hippo CMS development public mailinglist > > Searchable archives can be found at: > MarkMail: http://hippocms-dev.markmail.org > Nabble: http://www.nabble.com/Hippo-CMS-f26633.html > >
sitemap.xmap
Description: sitemap.xmap
******************************************** Hippocms-dev: Hippo CMS development public mailinglist Searchable archives can be found at: MarkMail: http://hippocms-dev.markmail.org Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
