Forums / Developer / Dynamic Content Stucture menu (AJAX) prototype

Dynamic Content Stucture menu (AJAX) prototype

Author Message

Brian Gambill

Thursday 13 October 2005 8:44:01 am

Great feature! Very fast! Good community effort.

I have a small (hopefully) problem. I installed the 0.2 version and it worked as advertised. I then laid in the 0.4 svn tarball and now nothing shows up. I believe I have cleared the cache. I am running 3.5.0 on bsd server. When I view the page source javascript I see nothing assigned to the variable wwwdir. Could that be it? Perhaps I am missing an ini setting?

Since I can't see it yet, can you tell me if the javascript to click on the icon and do stuff like hide/ edit/ etc are still available with this menu? It is so much faster, I wouldn't care if it was missing in that menu, but I am just curious.

Bertrand Dunogier

Thursday 13 October 2005 9:40:37 am

As explained in the updated readme, the link used to toggle the dynamic menu from the first version is gone. If the extension is enabled, the menu is used.

I just had to clear my templates cache and the menu was there, it should work the same way for you, Brian. Have fun ;)

Brian Gambill

Thursday 13 October 2005 12:58:58 pm

I understood that their was no longer a on/off selection. From my page source it seems like things are mostly working. The javascript is included, when it gets to the unordered list of the context menu, there is nothing there.

 <ul id="content_tree_menu">
            	

            </ul>

I figured out why, in my case, this doesn't work. At a minimum, the IF statements in prototype_menu.tpl are only valid for eZ 3.6 and beyond. I am using 3.5. This is at least worth noting when you update the contributions section.

Great feature. I at least get some AJAX type exmple code to look at. Thanks!

Kristian Hole

Thursday 13 October 2005 11:54:40 pm

Brian: In the v4 there are used templatesyntax which is from 3.6, so it will not work in 3.5. It is not that hard fix, but currently it only works with 3.6.

Kristian

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

Kristian Hole

Friday 14 October 2005 12:00:26 am

I have now updated the files in the contribution section to the latest version v0.4. Download and enjoy :-)

Kristian

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

Bo Vejgaard

Friday 14 October 2005 1:44:52 am

Regarding my IE problem with charsets, I've found out that any speciel danish character (æøå) is replaced with a questionmark (?) and 3-4 of the trailing characters are removed, this introduces errors where the speciel charater is at the end of a word, since it chops of some of the following </span> tag in the menu. If i click on a menu with a speciel character, it will be displayed rigth when i am on the page.

I Hope this makes sence, and someone can help me. This is a major issue, since all the editors of the site use IE (opposed to my recommendation).

EDIT: It seems like all the elements that are loaded when the page is requested are correct, but the menuitems, that are shown when you open a new level of the menu are incorrect.

Kristian Hole

Friday 14 October 2005 2:45:29 am

@Bo: Ahh.. I know why this is happening. The character set is not properly set. I will take a look at it this weekend.

EDIT:
Are you using UTF8 by the way?

Kristian

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

Bo Vejgaard

Friday 14 October 2005 5:01:41 am

@Kristian

I have tried both utf-8 and 8859-latin-1, and I can't get any of them to work.

Kristian Hole

Friday 14 October 2005 5:23:38 am

@Bo:

I did a small fix in the SVN version now. Can you try to check it out and test it?

Kristian

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

Bo Vejgaard

Friday 14 October 2005 5:37:08 am

@Kristian:

Still only works on FireFox.

Bertrand Dunogier

Monday 17 October 2005 1:00:09 am

Two comments on the menu :)

1. It looks like the tooltip that gives the node ID on hover on a menu item has not been reintegrated.

2. Is it a mistake that the open/close image tags are not closed ?

<img id='n60_toggle' src="/design/admin/images/content_tree-open.gif"</img>

Kristian Hole

Monday 17 October 2005 2:30:11 am

@Bo: It seems to be working with norwegian øæå and latin-1 charset. I'm not sure what is causing this.

@Bertrand:
1) We know the tooltips are missing, they will be added at some time.
2) I closed the tags in SVN.

Kristian

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

Bertrand Dunogier

Monday 17 October 2005 2:44:02 am

1. Cool
2. Thanks

;)

Bo Vejgaard

Tuesday 18 October 2005 12:09:17 am

Now I'm confused, because i still get charset errors, but only in IE and only on the parts of the menu that are closed when the page is loaded.

How many places in the eZ configuration do you have to specify which charset you are using?

EDIT: I have checked that my DB is set to latin1 and the databasesetting in site.ini is set to iso-8859-1.
The defaulttemplatecharset in template.ini is set to is0-8859-1 as well. Last, the Charset is set to iso-8859-1 in i18n.ini.

Kristian Hole

Thursday 20 October 2005 1:50:24 pm

@Bo:

Seems like you have all the correct settings. I'm a bit confused since it works here with øæå.

I suggest you try to load "/dynamicmenu/expand/2" on your site, where you replace 2 with a node id where you have get the problems with øæå.

Does that work? If you have Firefox with the developer toolbar, can you also check the charset that is set under "Information" -> "View response headers"

Kristian

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

Bo Vejgaard

Friday 21 October 2005 12:14:44 am

@Kristian:

Well the charset in the response header is iso-8859-1, and everything is working perfectly in firefox. If I open the /dynamicmenu/expand/(nodeid) the menu looks fine in Internet Explorer as well, but you can't use the shown menu. Since the problem never is in the part of the menu that is shown while the page is loaded, I can't use this approach to find the flaw.

It seems like the nested calls to load the menu is where the problem is, and this is very confusing, because as far as I understand the code, it seems like it is the same code that is called again.
What confuses me even more, is that the problem is only on Internet Explorer. So it seems like the nested load calls returns text in a different charset than the original.

If you like, I can mail a screendump where the selected node is marked, so it is clear where the errors are.

Kristian Hole

Monday 24 October 2005 2:04:30 am

@Bo:

The code is used, both for loading the menu, and for expanding an element with javascript. If you load the /dynamicmenu/expand/23. It does the exact same as if you click the + sign. If this loads correctly, the problem is in the javascript. Can you confirm this Bo? Try to load the sublevel that is not working directly with the /dynamicmenu/expand.

Kristian

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

Bo Vejgaard

Tuesday 25 October 2005 12:46:39 am

@Kristian:

The /dynamic/expand/59 is working in both IE and firefox, so then it must be the javascrupt, and that is not my strong side.

Kristian Hole

Wednesday 26 October 2005 12:24:40 am

Then we should take a look at the javascript part. A bit strange that it works for me. Are you running eZ publish on a windows or linux server? Which version of IE are you running?

Kristian

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

Bo Vejgaard

Wednesday 26 October 2005 12:36:53 am

@Kristian:

I'm running a debian 3.1 server, with mysql 4.0.24, apache 1.3.33 and php 4.3.10-16. The eZ version is 3.6.0.
The IE version is 6.0.2900.2180.xpsp_sp2_gdr.050301-1519