>>
Since the the "new role" function in the
portal sample is mapped to <new-role
uri="cocoon:raw:/sunrise-newrole"/> uri, it is
using this sitemap snippet right?
<map:match
pattern="sunrise*">
<map:generate src="resources/sunrise{1}.xml"/> <map:transform type="session"/> <map:transform type="cinclude"/> <map:transform type="write-source"/> <map:transform src="styles/portal.xsl"/> <map:serialize type="xml"/> </map:match> and the
documentations says that
The
new-role resource creates a new role in the system. It gets the
parameters "type" with the value "role" and "role" with the new
rolename.
Where is the "type" and "role"
parameter?
and why does it have to serialized in an xml type
in the end? <<
You
need to take a look at the file sunrise-newrole.xml. That file contains most of
the dirty work. The transformers session, cinclude and writesource act on the
information contained in there. Because sunrise-newrole.xml also flows through
the pipeline it is then formatted by the stylesheet and returned to the browser.
It is serialized to xml because it is being used inside the portal (in this
case).
If you
wanted to write this to a database you would need to change the
sunrise-newrole.xml and use the sqltransformer instead of cinclude and
write-source. In all this should take you around 5 minutes or less to adapt.
:-)
So it
really is quite simple really.
Matthew
--
Open Source Group Cocoon { Consulting, Training, Projects } ================================================================= Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn Tel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de ----------------------------------------------------------------- Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20 Weblog: http://radio.weblogs.com/0103021/ =================================================================
|
- Re: Cocoon Portal - User Roles Richard Reyes
- Re: Cocoon Portal - User Roles Richard Reyes
- RE: Cocoon Portal - User Roles Richard Reyes
- Re: Cocoon Portal - User Roles Matthew Langham
- Re: Cocoon Portal - User Roles Richard Reyes
- Re: Cocoon Portal - User Roles Richard Reyes
- RE: Cocoon Portal - User Roles Matthew Langham
- Re: Cocoon Portal - User Roles Andy Lewis
- RE: Cocoon Portal - User Roles Wolle
- RE: Cocoon Portal - User Roles Carsten Ziegeler