Hi Andrew
Am Samstag, 14. Oktober 2006 16:54 schrieb Andrew:
> Hi Niko !
> About part 2.
> I saw code related with browsing the website and
> it define only tree handler(hardcoded) to show website - not repository
> :(((
>
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.
> thanks
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 14, 2006 6:44 PM
> To: [email protected]
> Subject: Re: [magnolia-user] scheduled task in Magnolia
>
> Hi Andrey,
>
> 1. Programmatically, look at the LaunchWorkflow command in the
> magnolia code, and copy the way it starts a flow. The engine used is
> openwfe (http://www.openwfe.org) so you can just write any flow with
> it. Unfortunately, for some reasons, the guys at magnolia have
> removed the function to upload news flows, so I get the feeling this
> is going to be pretty tricky with the current RC4 release.
> 2. There is a jcr browser available from the menu. Look for the
> configuration of the menu for the admin interface. One entry is
> dedicated to browsing the website. You could just copy and paste and
> adjust the repository (or workspace name) to your liking.
>
> Regards,
>
> Niko
>
>
>
>
> ----------------------------------------------------------------
> for list details see
> http://www.magnolia.info/en/magnolia/developer.html
> ----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------