Forums / Developer / [AJAX-TreeMenu] ezodcsm extension discussion

[AJAX-TreeMenu] ezodcsm extension discussion

Author Message

Daniel Beyer

Wednesday 02 November 2005 1:25:12 am

The "eZ On Demand Contenstructurmenu" (ezodcsm) extension helps you to work with the tree menu in the admin interface even if you have lot's of objects in your content tree.

You can find more information about it here:
http://ez.no/community/contribs/hacks/ajax_treemenu_on_demand_tree_menu

This is the place were you can discuss about it, post bugs, make suggestions, post translations, etc.

Feel free to try out this extension, as it won't harm your eZ publish installation - and "share your information" with the community...

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

Daniel Beyer

Wednesday 02 November 2005 2:43:51 am

Bo Henriksen just discovered the first issue with this extension here is is original posting:

Nice but with some problems.
by Bo Henriksen on 02/11/2005 at 10:03:13 am

Rating: Good

On my smaller site, i really can't decide if I like this extension or Kristian Hole's dynamic menu better. But on my extremely large site they both have some problems, but Christians is faster, and is showing all the items.
I have around 4200 images in my media folders, and some of the subfolders contains up to 700 images, this makes the standard eZ menu impossible to use. This extension can't open the three for the large folders, and is very slow on the medium sized folders (around 200 items). 

He has the problem of having lots of object assigned to single nodes, meaning some nodes in is content tree has 200+ children (eg. the image folder in the media library).
This is something that can't be handled well - even with ajax, as we still have to fetch many object at the same time.

Now the extension gives one possible solution to this issue. You can simply hide every single image via the "HideClasses[]=image" option the extension provides. But this maybe isn't what you want, because it won't show any image in the tree anymore (anywhere in the admin siteaccess).

What could be done:
1. Adding an option to hide children of specific nodes (additionally only if they are from a specific class)

2. Adding an option allowing you to show only nodes in the tree that have children

3. Adding an logic that can be configured to hide nodes in the tree on specific criteria

It hink the third might be our solution. This is how I think the logic could be:
Check how many nodes are in the tree, if there are more than X (set X in config) but them by their class names in different virtual folders, showing up in the menu by opening the node with the many objects.
So opening that node by clicking the + won't show all X+ objects the folder has, but all different types of classes the objects in the folder has. Could look like this:

|-Media 
 |+ Files            [normal folder]
 |+ Streams          [normal folder]
 |- Images           [normal folder]
  |+ 278 Images      ["virtual folder"]
  |- Galleries       [normal folder]
   |+ 1412 Images    ["virtual folder"]

Now when you open the "1412 Images" virtual folder we shouldn't show the 1412 Images instantly, as we wouldn't get around the original problem. So we need to put them in other virtual folders, like this:

|-Media 
 |+ Files                  [normal folder]
 |+ Streams                [normal folder]
 |- Images                 [normal folder]
  |- 278 Images            ["class V-folder"]
   |+ Alphabetical         ["sorting V-folder"]
   |+ Time published       ["sorting V-folder"]
   |+ Published by         ["sorting V-folder"]
   |+ Time modified        ["sorting V-folder"]
   |+ Modified by          ["sorting V-folder"]
  |- Galleries             [normal folder]
   |+ 1412 Images          ["virtual folder"]

Wehre the single sorting virtual folders could look like this:

|- 278 Images
 |- Alphabetical
  |+ a-g
  |+ g-hung
  |+ hunk-z
 |- Time published
  |+ May 2003
  |+ January 2005
  |+ April 2005
 |- Published by
  |+ Administrator User
  |+ Hans Hauer
  |+ Max Mustermann
 |+ Time modified
 |+ Modified by

Of course we need a split up again, e.g. if many of those object were published in January 2005. This might be split down by weeks, days, hours, minutes, etc.
This could be possible for date sorting, but it would be much work and I don't know how it would influence the speed of the tree. So I prefer a setting allowing you to specify how many object should be in a virtual folder resulting in this:

  |- January 2005
   |+ 1-49
   |+ 50-99
   |+ 99-126

...seems someone has to write a specification for this...
I'll try to get some human resources at Young Media Concepts for this - but if anyone of yours want to work on this (or any other thing related to the tree menu), just get in touch with us via:
join-treedevel [a-sign] ymc.ch

Any feedback is welcome, Daniel.
</code>

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

Kristian Hole

Wednesday 02 November 2005 3:00:17 am

Hi Daniel.

I have a guestion about the menu. I see you have added a setting for hiding some classes. Does this mean that the ShowClasses and MaxDepth from contentstructure.ini is not working? It would be very cool if those settings were also working for your menu.. (It doesn't for the dynamicmenu extension)

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Daniel Beyer

Wednesday 02 November 2005 4:50:38 am

Hi Kristian,

the ezodcsm extension has full support for the treemenu operator as it comes with eZ publish. So ShowClasses and MaxDepth from contentstructure.ini should work for the ezodcsm extension.

I didn't test this for quite a long time (was in the 0.8 branch). But in theory every thing the normal tree menu can, the ezodscm tree menu can, too. If not, than it's a bug ;)

Can you try those options are working as they should and report your results here?

BTW.: Would be cool if you also could check out what happens if you say:

ShowClasses[]
ShowClasses[]=folder
HideClasses[]
HideClasses[]=folder

I expect you have nothing in your tree anymore, as you fetch only folders by the treemenu operator which then are hidden by the ezodcsm extension...

An other thing:
As nobody needs to different AJAX-menus, shouldn't we try to bring those two extensions together? This way we might be able to have a great extension in quite a sort time...

There are two things in your menu, which are missing in ezodscm:
-configurable timeout (at the moment the browser default is used)
-Errormessage for unsupported browser (at the moment ezodscm falls back to a "full page refreshing"-method without notifing the user about this)

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

Frederik Holljen

Wednesday 02 November 2005 5:29:03 am

Have any of you tried to create "between pages" caches in a cookie?

I don't know if any of you have implemented this yet, but it could be and idea to reduce server load.

Kristian Hole

Thursday 03 November 2005 1:47:38 am

@Daniel: That is cool. I did not test it, but if it was implemented that way, that means it should work, otherwise its a bug. Yes i think we sould merge the two extensions. Since your extension is the most complete one, i think we should implement the missing functionality in the ezodcsm menu. The functionality is not so hard to implement. Are you going to add this extension to pubsvn?

I asked some people here at eZ about translations, here are some more translations for "Please wait..":

"Vennligst vent.." Norwegian Bokmål
"Even wachten a.u.b.." Dutch
"Aguarde, por favor.." Portuguese
"Por favor espere un momento.." Spanish

@Frederik:
Storing the info in a cookie can be tricky because of cache invalidation when you publish content.

EDIT:
It's called Bokmål, not Bokbål (Book-fire).

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Daniel Beyer

Thursday 03 November 2005 2:48:37 am

I just uploaded 1.0.5 of this extension which includes now the translations Kristian posted:

-Norwegian (nor-NO)
-Dutch (dut-NL)
-Portuguese (por-PT)
-Spanish (esl-ES)

Please correct me, if I done a mistake with the "country-LANGUAGE" stuff.

@Kristian:
Yes, I'm going to put this on svn. I'll do this later this day (might even become night;), as I now have to travel to our office in swiss.
I'll get back to you all when it's up...

@Frederik:
I agree with Kristian that cookies might become kind of tricky. But there is an other way to speed this thing up, simply by using the template-cache of eZ publish - the current version makes no use of it, as there have been some problems using it. But those shouldn't be hard to fix...

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

Bo Vejgaard

Thursday 03 November 2005 3:09:59 am

@Daniel:
I know i have to wait for large folders to load, and I accept that, my two reason for choosing Kristians extension is, that it is a little faster on large folders, and the main reason, it will open all the folders. I just can't get your extension to work right.

I hope you will join forces to create a fantastic menu, and I will certainly provide you with all the information and feedback, i can.

By the way, the Danish (dan-DK) translation should be "Vent venligst...".

Frederik Holljen

Thursday 03 November 2005 3:46:20 am

Yep, there are issues with caching. But you could use an extremely short timout (like five minutes) which will most probably work perfectly for most users and which will still allow a great deal of performance improvement.

Daniel Beyer

Thursday 03 November 2005 4:25:28 pm

Hi there,

got quite late, but ezodscm is on pubsvn.ez.no now.

It's now v1.0.6 as it contains the danish (dan-DK) translation. Thank you Bo!

So let's get started with merging the two menus, making one really cool one...

Greetings, Daniel.

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

Stéphane Bullier

Tuesday 15 November 2005 3:18:54 am

Hello Daniel,

I can't succeed to use your extension in public interface. I'm looking for built a FAQ menu. Please help me.
Thank you.

Stéphane

Daniel Beyer

Tuesday 15 November 2005 4:48:22 am

Hi Bobo,

as I don't know where you actually have problems with ezodscm, I just start from the bottom...

1. Install ezodscm
==================
There is a file called INSTALL included in the extension, explaining how to integrate ezodcsm in your eZ publish.

2. Make sure ezodcsm is enabled
===============================
You need to enable the ezodcsm extension in your eZ publish installation either in your
(a) settings/site.ini
(b) settings/override/site.ini.append(.php)
(c) settings/siteacces/YOURACCESS/site.ini(.append)(.php).

At the moment there are two ways of including extensions in eZ publish:
-First via ActiveExtensions[]
-> The extension will be active for the hole installation
-Second via ActiveAccessExtensions[]
-> The extension will be active for selected siteaccesses only

In files (a) and (b) you need to use ActiveExtensions[], in (c) you should use ActiveAccessExtensions[] only!

In your case I recommend using file (b) by adding the following to it:

[ExtensionSettings]
ActiveExtensions[]=ezodcsm

3. Include the contentstructuremenu template on your site
========================================================
Finaly you need to include the right template in your site to have the menu avalible. This actually is pretty easy, as you only need to paste the following line in one of your templates (eg. pagelayout.tpl):

{include uri="design:contentstructuremenu/content_structure_menu.tpl"}

I suggest you put the menu it in a div called "contentstructure" and include the css-file "/design/standard/stylesheets/treemenu.css" in your html-header - example:

<html ...>
<head>

<!-- CSS for the treemenu //start -->
<link rel="stylesheet" type="text/css" href={"stylesheets/treemenu.css"|ezdesign} />
<!-- CSS for the treemenu //end -->

(...)
</head>
<body ...>
(...)

<!-- THE TREEMENU //start -->
<div id="contentstructure">
 {include uri="design:contentstructuremenu/content_structure_menu.tpl"}
</div>
<!-- THE TREEMENU //end -->

(...)
</body>
</html>

Now the ajax-enabled tree menu should be visible on your site...

Hope this helped you, Daniel.

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

Stéphane Bullier

Tuesday 15 November 2005 5:59:28 am

Hi Daniel,

Thank you for your reply. Now, it's working when I paste the line

{include uri="design:contentstructuremenu/content_structure_menu.tpl"}

in my pagelayout.

But is it possible to limit the menu to one folder in my content structure and paste the line above in override template ?

Greetings, Bobo.

Stéphane

Bo Vejgaard

Wednesday 16 November 2005 4:46:10 am

@daniel:

I've made a symlink in the design folder so admin_uk -> admin
And in my siteaccess/admin_uk/site.ini.append.php I have added the following lines:
[ExtensionSettings]
ActiveAccessExtensions[]=ezodcsm

But it won't work, it falls back to the standard menu.

Bo Vejgaard

Thursday 15 December 2005 3:49:51 am

Hi all,

Haven't heard anything new in a while. I still have som serious problems with getting this extension to work, as described previously.
Any suggestions are welcome, I've tried everything i know, and still can't make it work.

Paul Forsyth

Thursday 15 December 2005 4:29:58 am

One problem i had was that i had to put my own design directory into the extension, so copy design/admin to design/my_admin in the extension.

There is a bug in eZ which means that extension overrides seem to take precendance over local overrides.

http://ez.no/bugs/view/7400

For ezodcsm i found that the standard tpl was always being used. The solution was to make the copy in the extension itself.

Paul

Stig Aune

Monday 20 March 2006 11:04:10 am

I have just installed ver. 1.07, and see that the Content Sensitive menus that normally pop up when clicking on e.g. a folder icon in the tree menu is missing when using the ezodcsm extension. Does anyone know how to get this to work?

Daniel Beyer

Friday 24 March 2006 2:35:28 pm

Hi,

the normal popup should work with ezodcsm. Do you have still problem?

Greetings, Daniel.

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

Stig Aune

Saturday 25 March 2006 12:11:55 am

Yes, the problem is still there. I get the context sensitive menus when clicking on a node icon in the main window, but not when clicking on the node icon in the tree menu (the ezodcsm menu window).

When doing mouse-over, I see the normal lead-text "Click here to see the context sensitive menu" (in Norwegian, as I am running Norwegian language for the admin-interface), but no pop-up menu appears when clicking.

I would very much appreciate help :-)

Stig Aune

Saturday 25 March 2006 12:14:55 am

Additional info:

If deactivating the ezodcsm extension, the pop-up menus work right away.

And as stated earlier, they work perfectly in the main window even when ezodcsm is installed, the problem is related to the tree structure.