Enrique,

On Tue, 2006-07-04 at 12:02 +0200, Enrique Perez wrote:
> Hi all,
> 
> I've been reviewing "menu" element and I think I don't fully understand
> how this element works in J2 (especially, when used in combination with
> specific directory structure) =/ 
> So I have several questions:
> 
> 1.- When a new user is registered, a new folder with its username is
> created under "_user" directory. But I don't understand how
> "breadcrumbs" menu knows that, when the user logs in, the new root
> folder is "pages/_user/username/" instead of "pages/". And especially,
> why the psml pages located under "pages/" are still displayed as if they
> were located under "pages/_user/username/"? I've read something about
> "invalid URI's", but I didn't get too much of it. Does it mean that any
> psml located under any path containing a directory whose name starts
> with "_" displays as if it were located under "root" (or a virtual root
> specified by something -in this case the LoginPortlet-)?? Can anyone
> explain this to me, please (with other words different from J2 docs if
> possible)??

Pages and folders are aggregated across the PSML directory structure
according to the active Profiler rules. Any folders starting with '_'
are hidden, (e.g. '_user', '_role', '_mediatype', '_country', ...,
etc.), but subfolders within them are addressable via the active
Profiler rule. There are plenty of old threads in the user list that
discuss these topics. Search for articles in the archives with my name
and Profiler and/or PortalSite. You also might want to consult the
somewhat dated material in the J2 docs folder for the PortalSite,
PageManager, and Profiler components.

> 
> 2.- Is it possible *not* to show an specific psml located in "pages/"
> when I've logged in and my root is supposed to be
> "pages/_user/username"??

You can do this with security constriants, security permissions, or
profiling rules. Picling the best approach depends on your use case.

> 
> 3.- Supposed a menu defined, for example, this way:
> <menu name="xxx">
>       <separator>
>               <text>yyy</text>
> </separator>
> <option regexp="true">/*/*.psml</option>
> </menu>
> 
> this would create a menu:
> -     identified in J2 context by "xxx"
> -     labelled by "yyy"
> -     containing all the psml pages of all subfolders of the directory
> where this menu is defined.
> 
> Is that true?? Am I missing something??

You are correct. Keep in mind that the paths here are logical paths that
you would enter from the browser, not the physical paths within the PSML
directories. See #1 above.

> 
> 4.- Supposed the menu defined above, if I want to include it in my left
> navigation column, could I achieve this just by defining an <include>
> tag in the "page-navigations" menu defined at the top level?
> Similar to this:
> <menu name="page-navigations">
>       <include nested="true">xxx</include>
> </menu>
> 
> This way, my left navigation column should show a navigation pane with:
> -     folders available
> -     all the psml pages that we wanted when we created the menu "xxx"
> 
> Am I wrong again??

Again, you are correct. See WEB-INF/pages/_user/user/folder.metadata.
Login as user/user to see the effect. This same included menu approach
is used to integrate the 'page-navigations' menu itself. See the
definition of the standard 'navigations' menu:

<!-- standard navigations panel menu -->
<menu name="navigations">
  <separator>Folders</separator>
  <options regexp="true">./*/</options>
  <include>page-navigations</include>
  <separator>Additional Links</separator>
  <options regexp="true">/*.link</options>
</menu>

> 
> 5.- What if I want the menu "xxx" to be displayed in some tabs but not
> in others of the same level?? Could it be done by defining the menu in
> the psml code??

I am not sure what you are asking for here, but defining the menu in
different folder.metadata and *.psml files will yield different results
depending on where the user is. One can include missing, defined, or
overridden folders. The technique can have limitations though. Please
specify your use case in more detail if you'd like more concrete advice.

HTH,

Randy


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

Reply via email to