Hi,
Can anyone help me to call the section id and parent section id at the top of a products page?
Some background:
I am calling the section_tree array to build a products navigation. In the navigation each parent section is collapsed when the page loads. When you click on a section name the javascript makes the navigation section expand to reveal sub-sections.
If I could use the pages section and/or parent section in this javascript then I could make the navigation smarter by automatically expaning the navigation at an appropriate time. For example if you browse to a product in section 1, then when the page loads the section 1 navigation area is automatically expanded, and all the other sections are collapsed.
I know how to do all the JavaScript, it works well. What I do not know how to do is to get the page section id or parent section id into the head of the page. Any ideas?
Can anyone help me to call the section id and parent section id at the top of a products page?
Some background:
I am calling the section_tree array to build a products navigation. In the navigation each parent section is collapsed when the page loads. When you click on a section name the javascript makes the navigation section expand to reveal sub-sections.
If I could use the pages section and/or parent section in this javascript then I could make the navigation smarter by automatically expaning the navigation at an appropriate time. For example if you browse to a product in section 1, then when the page loads the section 1 navigation area is automatically expanded, and all the other sections are collapsed.
I know how to do all the JavaScript, it works well. What I do not know how to do is to get the page section id or parent section id into the head of the page. Any ideas?
Comment