Cool! Thanks Jasha :-)
Jasha Joachimsthal wrote:
I'll blog about it and put it on the Wiki ;)
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jeroen Reijn
Sent: woensdag 3 september 2008 12:36
To: Hippo CMS development public mailinglist
Subject: Re: [HippoCMS-dev] HCA polls
Jasha,
is this already documented somewhere on the wiki? If not
please do so! ;-)
Regards,
Jeroen
Jasha Joachimsthal wrote:
Hey Tim,
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of toolman
Sent: woensdag 3 september 2008 12:24
To: Hippo CMS development public mailinglist
Subject: [HippoCMS-dev] HCA polls
Hey team;
Is there a picker for Hippo Community Apps (HCA) polls
available for
my templates? I Need to add the poll ID to a few content types..
Anyone?
Yes, me ;)
In the business logic:
<picker id="activePolls" class="GenericPicker">
<arg><![CDATA['/editing/dialogs/listpicker/key-value-pairs?editor=cfor
ms
&single-item=true&source=cocoon://extensions/project-specific/activePo
ll
sAsNodelist']]></arg>
</picker>
Your extensions/project-specific/sitemap.xmap:
<?xml version="1.0" encoding="UTF-8"?> <map:sitemap
xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:components>
<map:generators default="file">
<map:generator label="polls" logger="sitemap.generator.file"
name="polls" pool-grow="4" pool-max="32"
pool-min="4"
src="nl.hippo.cocoon.generation.poll.PollListGenerator"/>
</map:generators>
</map:components>
<map:pipelines>
<map:pipeline type="ecaching">
<map:match pattern="*PollsAsNodelist">
<map:generate type="polls">
<map:parameter name="dateformat" value="dd-MM-yyyy"/>
<map:parameter name="expires" value="200"/>
<map:parameter name="poll-status" value="{1}"/>
<map:parameter name="offset" value="0"/>
<map:parameter name="nresults" value="500"/>
<map:parameter name="paging" value="true"/>
<map:parameter name="crpage" value="1"/>
<map:parameter name="pagesize" value="500"/>
</map:generate>
<map:transform src="transformers/polls2nodes.xsl"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
polls2nodes.xsl:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:poll="http://hippo.nl/cocoon/generation/poll"
version="1.0">
<xsl:template match="/">
<nodes>
<xsl:apply-templates select="poll:polls/poll:poll"/>
</nodes>
</xsl:template>
<xsl:template match="poll:poll">
<node id="[EMAIL PROTECTED]" value="{poll:question}"/>
</xsl:template>
</xsl:stylesheet>
********************************************
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
********************************************
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
********************************************
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
********************************************
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