Expanding menus for dummies

Vaska A / 2011-02-12 08:39:10   

Expanding menus for dummies

In exhibit, your differents pages (exhibit) are shared into categories. You can obtain that the links to the pages are collapse under the categorie name in the side menu, and that they appear when you click on the category name.

To obtain that :

First Step : Connect to your site management panel, then clic on “Réglage” (in French. So it may be “tuning” in English), and chose the “sample” Theme

Second Step : Download the expandingMenus.js file and up load it in yoursite/ndxz-studio/site/js/ directory

Link to download the file : www.rosscairns.com/downloads/expandingMenus.js

Third Step : Edit the file yoursite/ ndxz-studio/site/sample/index.php

Find lines with :

  1. <script type='text/javascript' src='<%baseurl%>/ndxz-studio/site/js/expandingMenus.js'></script>
  2. <script type='text/javascript'> 

Duplicate the wole line, and in the second one replace : "cookies.js" by "expandingMenus.js"

Some lines further, after

  1. $(document).ready(function()
  2. {
  3. setTimeout('move_up()', 1);

add :

  1. // always start with zero and count from there
  2. expandingMenu(0); expandingMenu(1); expandingMenu(2);

you should be carefull to keep the closing of the following brakets :

  1. });

Warning : the first category of your side menu is numbered 0, the second is numbered 1, etc …

After modifiying this index.php file, then upload it in yoursite/ ndxz-studio/site/sample/ directory

Note: I'm posting this thread for bernache who originally wrote it to get some code things organized. Thanks bernache!

Vaska A / 2011-02-12 08:41:21   

And the full script should look something like this...

  1. <script type='text/javascript' src='<%baseurl%>/ndxz-studio/site/js/expandingMenus.js'></script>
  2. <script type='text/javascript'> 
  3. $(document).ready(function()
  4. {
  5.   setTimeout('move_up()', 1);
  6.   expandingMenu(1); expandingMenu(2); expandingMenu(3); …
  7. });
  8. </script>

bernache / 2011-02-12 08:45:34   

Thanks, Vaska !

For michaelsen :

I dont know if it is the reason of your bug but in your index.php file, at the end of the line script type='text/javascript' src='http://jorgenmichaelsen.net/ndxz-studio/site/js/expandingMenus.js, you have put an antislash "" that has nothing to do there.

Vaska A / 2011-02-12 08:47:03   

Good work! ;)

michelfeist / 2011-02-12 15:39:13   

I must be a real dummy I am not getting this to work at all. can anyone lend a hand?
www.ampersandgrey.com

Vaska A / 2011-02-13 14:08:32   

This thread is closed - start a new thread for questions about this topic. And/or, search the forum, there are many threads already on this topic.

This thread has been closed, thank you.