Hi Jasha,
I solved the problem in this way.
Thanks a lot for your assistance. It's a pleasure to work with you.
Kind Regards
Petar
Jasha Joachimsthal wrote:
Hi Petar,
The location of the current document is available in a JXTemplate as
${flowContext.document}
So you could do something like
<map:match pattern="site-types.xml">
<map:generate type="jx" src="currentpath.xml"/>
<map:transform src="path2typeslocation.xsl"/>
<map:transform type="include"/>
<map:serialize type="xml"/>
</map:match>
currentpath.xml
<path>${flowContext.document}</path>
In the path2typeslocation.xsl you add the logic to convert the current
document path to an include for the types.xml of your site.
Jasha Joachimsthal
[EMAIL PROTECTED] - [EMAIL PROTECTED]
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-5100 +1 (707) 773-4646
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Petar Becic
Sent: maandag 24 november 2008 16:10
To: Hippo CMS development public mailinglist
Subject: [HippoCMS-dev] dynamic dropdown in BE templates
Hi all,
We have 2 different sites in the same Hippo repository.
root
site1
construction
types.xml
documents
site2
construction
types.xml
documents
Both sites share the same BE templates. Each BE template has
a dropdown that should be populated from xml document
"construction/types.xml".
In the rules.xml file I created a rule:
<rule for="/document/meta/common/type">
<selectionsource
src="cocoon://extensions/project-specific/types.xml" type="nodetree"
dynamic="true"/>
</rule>
and in the project-specific sitemap I have a matcher:
<map:match pattern="types.xml">
<map:generate
src="repository://content/{site}/construction/types.xml"/>
<map:serialize type="xml"/>
</map:match>
Instead of {site} I should have "site1" if I edit a document
from site1, and "site2" if I edit a document from site2.
How can I separate this?
Thanks in advance.
--
Met vriendelijke groet / Kind regards,
Petar Becic
Senior Software Developer
Levi9 Global Sourcing
===============================================================
Adress: Jan van Goyenkade 8, 1075 HP Amsterdam
Tel.: (+31) (0) 20 6701 947
Mobile: (+381) (0) 62 415 171
Email: [EMAIL PROTECTED]
SkypeID: p.becic
Internet: www.levi9.com
Chamber of commerce Levi9 Global Sourcing BV: 34221951
Chamber of commerce Levi9 Global Sourcing Benelux BV:
34224746
===============================================================
This e-mail may contain confidential or privileged
information. If you are not (one of) the intended
recipient(s), please notify the sender immediately by reply
e-mail and delete this message and any attachments
permanently without retaining a copy. Any review, disclosure,
copying, distribution or taking any action in reliance on the
contents of this e-mail by persons or entities other than the
intended recipient(s) is strictly prohibited and may be unlawful.
The services of Levi9 are exclusively subject to its general
terms and conditions. These general terms and conditions can
be found on www.levi9.com and a copy will be promptly
submitted to you on your request and free of charge.
********************************************
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
--
Met vriendelijke groet / Kind regards,
Petar Becic
Senior Software Developer
Levi9 Global Sourcing
===============================================================
Adress: Jan van Goyenkade 8, 1075 HP Amsterdam
Tel.: (+31) (0) 20 6701 947
Mobile: (+381) (0) 62 415 171
Email: [EMAIL PROTECTED]
SkypeID: p.becic
Internet: www.levi9.com
Chamber of commerce Levi9 Global Sourcing BV: 34221951
Chamber of commerce Levi9 Global Sourcing Benelux BV: 34224746
===============================================================
This e-mail may contain confidential or privileged information. If you are not
(one of) the intended recipient(s), please notify the sender immediately by
reply e-mail and delete this message and any attachments permanently without
retaining a copy. Any review, disclosure, copying, distribution or taking any
action in reliance on the contents of this e-mail by persons or entities other
than the intended recipient(s) is strictly prohibited and may be unlawful.
The services of Levi9 are exclusively subject to its general terms and
conditions. These general terms and conditions can be found on www.levi9.com
and a copy will be promptly submitted to you on your request and free of charge.
********************************************
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