You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sergio Carvalho <se...@acm.org> on 2001/10/14 23:57:44 UTC
[donation] SectionCutter action
Hi,
I'm sorry for the delay sending the section cutter action I talked about in a
thread some days ago. I had plans for implementing regexp matching on the action
before donating it to the Cocoon project, but too many last-minute tasks pop up
too often :-( I'll try to pick this up next weekend.
The action is used like this:
1) Declare the action in the map:actions element of the sitemap. Define the
different site sections, and the variables there:
<map:action name="cut-section"
src="org.apache.cocoon.acting.SectionCutterAction">
<section pattern="jogos">
<set-var name="section" value="jogos" />
<set-var name="title" value="Jogos" />
</section>
<section pattern="forums/read/chat/quadro/">
<set-var name="section" value="chat" />
<set-var name="title" value="Chat" />
<set-var name="dart" value="tagarela.portugalmail.pt" />
</section>
</map:action>
2) Use the action on the sitemap, just like all other actions:
<map:match pattern="**">
<map:act type="cut-section">
...
The variables defined with set-var on the section definition will be available
in the sitemap as {section}, {title}, {dart} for the example above.
Currently, the pattern matches against the beggining of the URI, with no
wildcards. I plan (need) to have it match regular expressions.
Cheers,
--
Sergio Carvalho
---------------
sergio.carvalho@acm.org
If at first you don't succeed, skydiving is not for you
RE: [donation] SectionCutter action
Posted by Carsten Ziegeler <cz...@sundn.de>.
Hi Sergio,
thanks for your contribution! It looks really interesting.
If noone else is looking at it in the next days, I would ask
you to add these to bugzilla as an enhancement so that it
doesn't get lost.
Carsten
> -----Original Message-----
> From: Sergio Carvalho [mailto:sergio.carvalho@acm.org]
> Sent: Sunday, October 14, 2001 11:58 PM
> To: cocoon-dev@xml.apache.org
> Subject: [donation] SectionCutter action
>
>
> Hi,
>
> I'm sorry for the delay sending the section cutter action I
> talked about in a
> thread some days ago. I had plans for implementing regexp
> matching on the action
> before donating it to the Cocoon project, but too many
> last-minute tasks pop up
> too often :-( I'll try to pick this up next weekend.
>
> The action is used like this:
> 1) Declare the action in the map:actions element of the sitemap.
> Define the
> different site sections, and the variables there:
> <map:action name="cut-section"
> src="org.apache.cocoon.acting.SectionCutterAction">
> <section pattern="jogos">
> <set-var name="section" value="jogos" />
> <set-var name="title" value="Jogos" />
> </section>
> <section pattern="forums/read/chat/quadro/">
> <set-var name="section" value="chat" />
> <set-var name="title" value="Chat" />
> <set-var name="dart" value="tagarela.portugalmail.pt" />
> </section>
> </map:action>
>
> 2) Use the action on the sitemap, just like all other actions:
> <map:match pattern="**">
> <map:act type="cut-section">
> ...
>
> The variables defined with set-var on the section definition will
> be available
> in the sitemap as {section}, {title}, {dart} for the example above.
>
> Currently, the pattern matches against the beggining of the URI, with no
> wildcards. I plan (need) to have it match regular expressions.
>
> Cheers,
>
> --
> Sergio Carvalho
> ---------------
> sergio.carvalho@acm.org
>
> If at first you don't succeed, skydiving is not for you
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org