Hi, I've created a new Custom Resource Type with no problems by
following the instructions available in
http://lenya.apache.org/1_2_x/how-to/custom_resourcetype.html. Now, I
want that the menu entry for the creation of this new resource only
becomes active given certain conditions; I've looked into
/mypub/config/menus/generic.xsp /and couldn't figure out a way of
performing it. This is my current condition for the menu entry (New
Profile) to become active:
<xsp:logic>
{
if (Publication.ARCHIVE_AREA.equals(area) ||
Publication.TRASH_AREA.equals(area)) {
<item><i18n:text>New Document</i18n:text></item>
}
else {
<item uc:usecase="create" uc:step="showscreen"
href="?doctype=xhtml"><i18n:text>New Document</i18n:text></item>
<!-- Menu entry for New Profile -->
<item uc:usecase="create" uc:step="showscreen"
href="?doctype=profile"><i18n:text>New Profile</i18n:text></item>
}
}
</xsp:logic>
It's appearing in the same conditions as the New Document entry, but I
wish for it to be available only in this conditions if the url contains
the string "people_en.html" or "people_pt.html", which in practice is
the same to say that I only want it to be active only when the current
node has document id "people". From what I could make from it, I will
only have to insert a new if statement using the parameter
"currentDocumentId", but I don't know which method to use in order to
see if the string contains "people_". Can someone give me a hint about this?
Thanks in advance, regards
Rolando
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]