Thanks, Chris.
It was very useful.

Andrey

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 15, 2006 9:33 PM
To: [email protected]
Subject: Re: [magnolia-user] scheduled task in Magnolia


It isn't hard coded.  You can point your tree definition in Mangolia at any 
repository you like.  For example copy the menu node at:
modules/admininterface/config/menu/tools/websiteJCR

to 
modules/admininterface/config/menu/tools/myJCR

change the title, and change the onclick values.
title = my menu item
onclick = MgnlAdminCentral.showTree('my-tree');

then create a tree node called 'my-tree'.  To get you started copy the 
existing website-jcr tree definition and rename it to my-tree.

Then edit the repository value referenced in your my-tree tree definition to

point at the repository in which you are interested.  If you have configured

your menu and tree under the modules/admininterface node, then you shouldn't

even have to restart Magnolia.  (I believe the new tree definition will be 
picked up.  But if it isn't simply restart.)  Logout and login to update the

menus.

Unless your repository uses custom types you are done.  If your repository 
contains custom node types, the tree won't display them, and there are a 
couple more steps to take.

For example if you try what I've outlined on the users or groups
repositories 
and you should see nothing.  This is because of the ConfigTreeConfiguration 
used by the website tree sets you up to view only mgnl:nodeData 
mgnl:contentNode and mgnl:content.  Which makes sense for the website 
repository, but not for the groups or users repositories. Neither of them  
contain such nodes.

So... Subclass ConfigTreeConfiguration override prepareTree(Tree, boolean, 
HttpServletRequest) and add you own node types:

public void prepareTree(Tree tree, boolean browseMode, HttpServletRequest 
request) {
        super.prepareTree(tree,browseMode,request);
        tree.addItemType("lxm:category");
        tree.addItemType("lxm:offer");
    }

The addItemType calls set me up with the example to see nodes of my custom 
node types.  (which also wont help you, but you can always replace them.)

Hope this helps.


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to