I also played around with Resource Types and Custom Menus,
my approach is like this:

In <pubid>/menus.xmap add an Entry for the Resource Type,
it should look something like this:

      <!-- menu for the people resource type -->
      <map:match type="doctype" pattern="people">
        <map:generate type="serverpages" src="config/menus/people.xsp"/>
        <map:serialize type="xml"/>
      </map:match>

Then add your own menu as <pubid>/config/menus/people.xsp. You can start
with a copy of generic.xsp and change it to fit your needs.

The new menu appears when the "Authoring" tab in Lenya is chosen and the
selected Resource Type is "people".

best regards

Michael




Rolando Isidoro wrote:
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]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to