Tuesday, June 7, 2005, 7:25:27 PM, Rolando Isidoro wrote:

RI> It's appearing in the same conditions as the New Document entry, but I
RI> wish for it to be available only in this conditions if the url contains
RI> the string "people_en.html" or "people_pt.html", which in practice is
RI> the same to say that I only want it to be active only when the current
RI> node has document id "people". From what I could make from it, I will
RI> only have to insert a new if statement using the parameter 
RI> "currentDocumentId", but I don't know which method to use in order to
RI> see if the string contains "people_". Can someone give me a hint about this?

In outer logic block, take a clean local document id:

String localDocumentId = <input:get-attribute module="page-envelope" 
as="string" name="document-id"/>;

/* the already defined documentID is not actually documentID but
rather document url, it contains prefix, area, language, etc */

And in logic block that defines menu items:
          if ( localDocumentId.equals("/personal") ) {
            <item uc:usecase="create" uc:step="showscreen" 
href="?doctype=profile"><i18n:text>Create user profile</i18n:text
          }
          else {
            <item><i18n:text>Create user profile</i18n:text></item>
          }

If you want to create profiles not only under document /personal but
also under its children, that you should use 
localDocumentId.startsWith("/personal");

-- 
 qMax


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

Reply via email to