Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Bullet Accordion Menu No Submenu and Current Page highlight

  1. #1
    Join Date
    Dec 2008
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Bullet Accordion Menu No Submenu and Current Page highlight

    1) Script Title: Bullet List Accordion Menu with nested levels

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...enu-bullet.htm


    3) Describe problem:
    My site link http://www.llewoh.com/Busing/Test

    Hello there. In customizing slightly this menu system I have run into a couple items that I have not been able to find the solution through hours of searching all the Dynamic Forums.

    1. On my site you will see I have a "Profile" link that has no submenu system. How can I get this link to collapse the "Project" header menu?

    2. When you first arrive to the index.html page I would like the entire menu system to be collapsed. I have tried everything including "defaultexpanded: [] w/ or without a value. What do I need to do in order to have this system fully closed at index and contact? I

    3. How can I get the current "Project" page submenu item to be highligted i.e. Projects-->Civic-->WCC Classroom (each of these should be solid black once that page is active).

    I greatly appreciate your assistance with this.

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    #2 Make sure these two settings look like this:

    defaultexpanded: [], //nothing inside the bracket will make all menus collapsed as default.

    persiststate: false, //this will start from default every time you refresh the page

  3. #3
    Join Date
    Dec 2008
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Snookerman thank you for that answer on technical #1 & #2. If you go back to the site now you will see that when you arrive the menu is closed on both Profile and Contact.

    BACKGROUND ON PROJECT:
    Now Profile and Contact pages both use the same template which allowed me to change the defaultexpanded and persiststate as you noted below.And get the desired effect.

    The Project pages use a separate template with the menu system set there too so i have control over the accordion system on there too.

    QUESTION1:
    How can I get when a user does hit Project from the Profile or Contact Page and the menu opens up to not retain the previous state? But just show the the indvidual submenus (i.e. civic, corporate, historic, etc). I have played with the defaultexpanded and persiststate but no luck...there are most likely some limits...(if you click through I think you will understand.

    QUESTION2:
    Any luck on previous post question 3 with highlighted state on current active page?

  4. #4
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    #1 Find this code for the 2nd level headers:
    Code:
    ddaccordion.init({ //2nd level headers initialization
    	headerclass: "subexpandable", //Shared CSS class name of sub headers group that are expandable
    	contentclass: "subcategoryitems", //Shared CSS class name of sub contents group
    	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
    	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
    	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
    	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
    	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
    	animatedefault: false, //Should contents open by default be animated into view?
    	persiststate: false, //persist state of opened contents within browser session?
    Make sure persiststate is false and defaultexpanded is [].

    #2 It seems that this works for the second level, Civic stays highlighted when clicked. Maybe you could do the same for the others? If you can't find out how, I'll try to help you later. Maybe ddadmin knows how to do this?

  5. #5
    Join Date
    Dec 2008
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Snookerman the only problem with Make sure persiststate is false and defaultexpanded is []. at the second level is that when you have been browsing the Projects section as you will from update that this happens:

    1. go to site. Hit Projects--> Civic-->WCC first project
    2. go to Contact.
    3. Now go back to Projects-->Residential-->first project

    See how the menu retains the previous project state in item 1 above?

    So the question is how to clear that cookie!

    As per what I did for Civic and doing the same for the lower levels, I tried that too but I do not believe there is a class that allows the same functionality! I am hoping DDADMIN can take a peak.

    Thank you so much.

  6. #6
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    It doesn't do it for me, it works fine now, they are always closed, I suggest you clear your browser cache. And also, make sure persiststate is false on all pages (on this one for example they are false on both levels.

    I do not believe there is a class that allows the same functionality
    You can just add a class. If there is already one, you can add one more, just separate them with spaces: class="value1 value2 value3".

  7. #7
    Join Date
    Dec 2008
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    The quirk when you do this:

    1. go to site. Hit Projects--> Civic-->WCC first project
    2. go to Contact.
    3. Now go back to Projects-->Residential-->first project

    if you notice it will bring up the first project under residential but the menu will revert back to Civic or previous/last Project category visited just on the initial.

  8. #8
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    You have not made the changes on all pages. Here is an example.

    http://www.llewoh.com/Busing/Test/html/civic/wcc_facilities.html

    Change presiststate to false on all your pages.

  9. The Following User Says Thank You to Snookerman For This Useful Post:

    dhognen (12-14-2008)

  10. #9
    Join Date
    Dec 2008
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Snookerman I know that on my PROJECTS TEMPLATE I haven't turned them all to false because when I am in the projects section viewing projects I want the user to see the submenu nested levels of the project i.e.

    PROJECTS-->Civic-->all project under heading (these must always be open under that project section when in projects section so a user can see all of the projects under it.)

    The only quirk is just when you first go back to PROJECTS from the PROFILE or CONTACT pages and choose a different project category other than the last one, it will go to that new project but the menu will revert just on the init to the last looked a project. I am trying to figure out:

    example:
    1. Projects-->Healthcare--Lowenthal Infusion Center
    2. LEAVE Projects go to PROFILE PAGE
    3. GO BACK TO Projects-->Residential-->Sutton Manor
    4. You will note that it went to Sutton Manor BUT the menu itself reverted back to Healthcare!

    BUT NOW if you were to surf through the Projects Section everything would function properly.
    QUESTION IS:

    How can I get it (menu) to forget the last project visited so that when I leave the project section and go to the PROFILE OR CONTACT sections and return to the Projects Section the above example don't happen in the inital revisit to the Projects section?
    Last edited by dhognen; 12-14-2008 at 04:58 PM.

  11. #10
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Ok I understand what you want now, but there is a better approach to this which I think will not cause you any problems.

    Start by setting persiststate to false on all pages (hehe echo, echo..). Then if you want for example the first wcc project to be marked when you are on that page, just set it to open by default. Do this for all the pages where you want the user to see the submenus.

  12. The Following User Says Thank You to Snookerman For This Useful Post:

    dhognen (12-14-2008)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •