Let me show you exactly what I am doing:
1. On this page:
http://www.invanto.com/index.php/docs/category/sitemanpro
The sub categories (on the left) of the selected product (from the top menu should be displayed). If I select a different product (WPSuite or EESuite) from the top menu, their sub cats should be displayed.
This part is working fine using this code for the categories on the left:
<ul>
{exp:gwcode_categories cat_url_title="{segment_3}" incl_self="no" style="linear" cat_id="{embed:cat_id}"}
<li><a href="http://{path=docs/category}/{cat_name}class=active">{cat_name}</a></li>
{/exp:gwcode_categories}
</ul>
2. When you open a entry to read, the cats on the left should be displayed of the parent category of the opened document. For example, if I open the document (http://www.invanto.com/index.php/docs/guide/getresponse-integration) then sub cats should be displayed of the parent cat of the select document. THIS IS ALSO WORKING.
But what is not what working in this point is that the parent category at the top is lost (not highlighted with a little top arrow pointer). But I can live with it if not doable.
The code I am using to display categories on this page is (within exp:entry loop)
<ul>
{categories limit="1"}
{exp:gwcode_categories cat_id="{category_id}" parse="inward" style="linear" incl_self="no" }
<li><a href="/docs/category/{cat_name}class=active">{cat_name}</a></li>
{/exp:gwcode_categories}
{/categories}
</ul>
3. THIS IS THE MAIN PROBLEM - Now when I click on any of the sub cats in the left side menu, though it displays the documents of the clicked category, all the sub cats vanish when page reloads because now it tries to load the children of the clicked category. What I want is keep the menu same if a child category is clicked.
For example, if you click the ADMINSTRATION sub cat on the left, and visit this page (http://www.invanto.com/index.php/docs/category/Administration) none of the left side cats are shown. Moreover, the top horizontal parent category reference is also lost.
Is there a way to resolve this?