You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Giampaolo/Trapo <ne...@trapo.it> on 2004/05/29 15:16:57 UTC
About configuration of menus
Hi people and a big thank to all developers for their continuous effort
to bring to like the best opensource cms.
I'm trying to hack the menu configuration. I would like to solve this
task: if the url of the current page has a specific value (for example
contactus.html) i wanna to avoid that a user could add a new page under
that page (for example i wanna contact info in only one page).
Can you indicate me how to reach this?
giampaolo/trapo
ps: and what if i wanna the same thing using doctype instead?
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: About configuration of menus
Posted by Andreas Hartmann <an...@apache.org>.
Giampaolo/Trapo wrote:
> Hi people and a big thank to all developers for their continuous effort
> to bring to like the best opensource cms.
> I'm trying to hack the menu configuration. I would like to solve this
> task: if the url of the current page has a specific value (for example
> contactus.html) i wanna to avoid that a user could add a new page under
> that page (for example i wanna contact info in only one page).
> Can you indicate me how to reach this?
<xsp:logic>
String documentName = <input:get-attribute module="page-envelope"
name="document-name" as="string"/>;
if ("contactus".equals(documentName)) {
<item>Add new Page</item>
}
else {
<item href="...">Add new Page</item>
}
</xsp:logic>
(sorry if there are typos)
If you don't add a @href attribute, the menu item will be disabled.
> ps: and what if i wanna the same thing using doctype instead?
<input:get-attribute module="page-envelope"
name="document-type" as="string"/>
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org