Hello Joachim,

About the configuration of the navigation portlet, supossing that you already 
have the sections (or workspaces) hierarchy. You can create a new cache tree 
which has as root the folder from where you want to start the menu.

I have just done this test:
 1. Create a new cache tree in portal_trees with identifier "menu"
 2. Set exactly the same properties as workspaces cache tree has.
 3. In the navigation portlet, set "menu" in the field Tree Roots.
 4. Limit the end depth to the value you need (maybe 2).

Although there's something I don't understand yet. Why if the properties of 
trees "menu" and "workspaces" is the same and this trees are included as roots 
in a navigation portlet the tree "workspaces" shows the folder "workspaces" in 
the first level but "menu" shows the subfolders of "workspaces" in the first 
level? Does anybody knows why?

Another way of doing this is adding a new field and widget to the schema and 
layout, respectively, of navigation_portlet. This new field can be identified 
with "start_depth" and would be use to filter te first levels of the tree.

The steps would be:
        1. Add a new Int field "start_depth" in "navigation_portlet" schema.
        2. Add a new Int widget "start_depth" in "navigation_protlet" layout.
         The properties shoulbe very similar to "end_depth"
      3. Customize the page template "widget_portlet_navigation". Where you 
need to look for this snippet and modify it to add a line which will give 
"getNavigationItems" our new parameter "start_depth".

This snippet:

##########################################
<tal:block condition="python: display == 'navigation_tree'">
    <tal:block
     define="show_icons ds/show_icons;
             show_icons python: int(show_icons);
             contextual ds/contextual;
             end_depth ds/end_depth;
             folderItems python: context.getNavigationItems(
                 root_uids=root_uids,
                 context_rpath=context_rpath,
                 context_obj=context,
                 contextual=contextual,
                 end_depth=int(end_depth),
                 display_description=display_description,
                 display_hidden_folders=display_hidden_folders,
                 );
#########################################

should look like this:

##########################################
<tal:block condition="python: display == 'navigation_tree'">
    <tal:block
     define="show_icons ds/show_icons;
             show_icons python: int(show_icons);
             contextual ds/contextual;
             end_depth ds/end_depth;
             folderItems python: context.getNavigationItems(
                 root_uids=root_uids,
                 context_rpath=context_rpath,
                 context_obj=context,
                 contextual=contextual,
                 end_depth=int(end_depth),
                 start_depth=int(start_depth),
                 display_description=display_description,
                 display_hidden_folders=display_hidden_folders,
                 );
#########################################

        4. Now, go to configure your navigation portlet and set "workspaces" as 
tree roots
        5. Set adequate values for "Start depth" and "End depth" to limit the 
hierarchy so that it looks like your desired menu.

This last solution has an inconvenient: the first level of the tree may vary 
depending on the permissions of the current user.

Any other solution? ;-)

I hope this can help.

Regards.

JoseLuis de la Rosa Triviño 
Becario Área de Sistemas de Información 
FUNDACIÓN IAVANTE 
[EMAIL PROTECTED] 
Tel. 951 015 300 


Este correo electrónico y, en su caso, cualquier fichero anexo, contiene 
información confidencial exclusivamente dirigida a su(s) destinatario(s). Toda 
copia o divulgación deberá ser autorizada por IAVANTE.

This e-mail and any attachments are confidential and exclusively directed to 
its adressee(s). Any copy or distribution will have to be authorized by IAVANTE.



-----Mensaje original-----
De: Joachim Schmitz [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 14 de marzo de 2006 19:16
Para: [email protected]
Asunto: [CPS-devel] migrating a site to cps

as an exercise I want to migrate an existing pure html site to CPS, just 
by configuring the CPS default site and creating a special theme for 
display. The site is live here: http://www.juelich.de/jgv/jgv.html.

It is not very nice or functional, but for a start I want to keep the 
design and layout for the public-view, and use CPS for publishing the 
content.

In Workspaces I created a Workspace "jgv" and in Sections a Section 
"jgv", I gave the section-reader local-role to "All users"

I created a document "home" and submited it to the section "jgv".
How can I make this the "index.html of jgv ?

Also which navigation-portlet in what configuration gives me a similar 
look for the navigation as on the original site ?


-- 
Mit freundlichen Grüßen                                Joachim Schmitz
......................................................................
AixtraWare eK ..Joachim Schmitz ..www.aixtraware.de ..t: +49-2464-8851
Hüsgenstr. 33a .....d-52457 Aldenhoven .............f: +49-2464-905163c


_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to