Making PHP menu read "expands" from text file

N Welch
  • N Welch

    N Welch - 2006-05-07

    Subject lines are far too short @ Sourceforge forums ;)

    My question is regarding the PHP "accessiblity" menus.  I am building them from a text file and would like to have them read the setting I have for the "expand" field (as well as maintain expand/collapse functionality) instead of using the "PHPTreeMenuDefaultExpansion".

    I am integrating PHPLM as an add-on for a popular e-commerce package. The desired behaviour for the tree menu (PHP and JS ver.) is that the nodes representing the category (and parents) that the user is in would be open and all others closed when going from page to page. They could of course expand other nodes (leaving the ones marked for expansion open).

    I was able to acheive this with the JS tree menus by simply clearing the expand/collapse cookies after they are parsed, but am having some difficulty modifying the to get the same result.

    I was messing about the
    "for ($i=$this->_firstItem[$menu_name];" loop adding something like (around ln 195):

    if ($this->tree[$i]['expanded'] == 1) {
    $expand[$i] = 1;
    $visible[$i] = 1;               
    Which only displays the items marked expanded, but not other items in same level which are not (plus it breaks the expand/collapse behavior for the selected node.

    If anyone has sucessfully done though or have some guidance to offer, I'd be most appreciative.

    P.S. I have all the other menus types working well and made clever use of the target field to act as a "selector" marker marking the different levels of the categories...   

    • N Welch

      N Welch - 2006-05-10

      Well, after some modest deliberation, I don't think I'll be incorporating the server-side PHP menu into my solution... 'Course if someone has an answer for above I'd be interested just to satisfy my own dimented curiosity ;)


Log in to post a comment.