You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Jann Forrer <ja...@id.unizh.ch> on 2005/11/02 10:51:29 UTC

[Lenya-1.2.x]Make menus in info area depending on doctype

Hi

We made the lenya menu entries depending on the doctype e.g. after a news
site (doctype news) only a news item should show up in the File-Menu.

For the authoring area this was no problem and we do not had to change the
lenya-core.
But for the info area we had to change info.xmap in the lenya-core as follows:

===================================================================
--- info.xmap   (revision 330212)
+++ info.xmap   (working copy)
@@ -302,7 +302,7 @@
           </map:transform>

           <map:act type="language-exists">
-            <map:transform
src="cocoon://lenya-page/{../../1}/info/default.xml?doctype={page-envelope:document-type}"/>
+            <map:transform
src="cocoon://lenya-page/{../../1}/info/{page-envelope:document-type}?doctype={page-envelope:document-type}"/>

             <map:call resource="i18n"/>
             <map:transform src="xslt/util/strip_namespaces.xsl"/>

I found no error due to that change in the default pub. If there are no
objections i can check it in. That might be useful for others too ....

Jann

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [Lenya-1.2.x]Make menus in info area depending on doctype

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Wed, 2 Nov 2005, Michael Wechner wrote:

> Jann Forrer wrote:
>
>> Hi
>> 
>> We made the lenya menu entries depending on the doctype e.g. after a news
>> site (doctype news) only a news item should show up in the File-Menu.
>> 
>> For the authoring area this was no problem and we do not had to change the
>> lenya-core.
>> But for the info area we had to change info.xmap in the lenya-core as 
>> follows:
>> 
>> ===================================================================
>> --- info.xmap   (revision 330212)
>> +++ info.xmap   (working copy)
>> @@ -302,7 +302,7 @@
>>           </map:transform>
>>
>>           <map:act type="language-exists">
>> -            <map:transform
>> src="cocoon://lenya-page/{../../1}/info/default.xml?doctype={page-envelope:document-type}"/>
>> +            <map:transform
>> src="cocoon://lenya-page/{../../1}/info/{page-envelope:document-type}?doctype={page-envelope:document-type}"/>
>>
>>             <map:call resource="i18n"/>
>>             <map:transform src="xslt/util/strip_namespaces.xsl"/>
>> 
>> I found no error due to that change in the default pub. If there are no
>> objections i can check it in. That might be useful for others too ....
>> 
>
> definitely, but I don't fully understand to be honest. Within the authoring 
> area the menus.xmap is responsible for selecting the menu and isn't it 
> confusing if within the site/info area
> this is being handled differently?
>

Sorry forget about that question. We did miss to add the doctypes matcher 
in our menus.xmap. The menus are already doctypes aware in the default 
publication :-)

But why is *default.xml* used in the cocoon protocol?

Jann

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [Lenya-1.2.x]Make menus in info area depending on doctype

Posted by Michael Wechner <mi...@wyona.com>.
Jann Forrer wrote:

>Hi
>
>We made the lenya menu entries depending on the doctype e.g. after a news
>site (doctype news) only a news item should show up in the File-Menu.
>
>For the authoring area this was no problem and we do not had to change the
>lenya-core.
>But for the info area we had to change info.xmap in the lenya-core as follows:
>
>===================================================================
>--- info.xmap   (revision 330212)
>+++ info.xmap   (working copy)
>@@ -302,7 +302,7 @@
>           </map:transform>
>
>           <map:act type="language-exists">
>-            <map:transform
>src="cocoon://lenya-page/{../../1}/info/default.xml?doctype={page-envelope:document-type}"/>
>+            <map:transform
>src="cocoon://lenya-page/{../../1}/info/{page-envelope:document-type}?doctype={page-envelope:document-type}"/>
>
>             <map:call resource="i18n"/>
>             <map:transform src="xslt/util/strip_namespaces.xsl"/>
>
>I found no error due to that change in the default pub. If there are no
>objections i can check it in. That might be useful for others too ....
>  
>

definitely, but I don't fully understand to be honest. Within the 
authoring area the menus.xmap is responsible for selecting the menu and 
isn't it confusing if within the site/info area
this is being handled differently?

Also doesn't it break the site/info area for people using different 
doctypes but not having
corresponding menus or is there a fallback?

Thanks

Michi

>Jann
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
>For additional commands, e-mail: dev-help@lenya.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org