Developer forum

Forum » Templates » ecom navigation

ecom navigation


Reply
Hi!

The new ecom-navigation feature looks very useful, however, we would like to hide the 1. page (the 'product page' where the ecom navigation is choosen).

All our products are in subgroups and we want to show these subgroups as menu choises in our left menu (2 levels).

Hiding the 1. page from menu (show in menu tab) also hides the generated subpages so that doesn't help.

We also tried to hide the 1. level page in our xslt navigation file, that worked, but this page needs to be open to display the subpages, so trouble again.

Does anyone have any tips?

cheers-
jan

Replies

 
Reply
Hi Jan

It's possible to do in XSLT, but you need to do a special template for those pages you want hide.

Take a look at the attached example which should skip all pagenodes where the attribute is equal 1.

// Dammark
 
Reply
Hi! thanks for the fast answer!

We fixed it in xslt as you suggested, hid the top page, expanded all 2. level pages and expanded only 3. level if in path.

Works beautifully now.

cheers-
jan
 
Reply
Hi

Er.... The DwLegend doesn't reflect the generated ecom pages, also the left menu looses the 'inPath' information after pressing product detail (collapsing the left menu).

monster.net.dynamicweb.no

Is there any fix for this?


-jan
 
Reply
Hi Jan,

Did you manage to get the PagePath working? I got it but using some Javascript/jQuery in the category list, product list and product templates.

Did you have a better ideia or approach? I sometimes have to use this feature, and am always on the lookout for a better way.

I can also provide you what I have if you want to.

Best Regards,
Nuno
 
Reply
Hi

sorry for the late reply.

We haven't solved this yet, did you have a fix?

cheers
 
Reply
Hi Jan,

Yes I do, but it's a bit complex. It requires:
 - DwLegend small manipulation
 - jQuery
 - XSLT menus with specific attributes
 - product-list template calls a javascript function
 - product template call another javascript function

If you are interested I can try to get a clean version of if and send it to you.

Best Regards,
Nuno
 
Reply
This is not worlds best fix or workaround, but its works.

We have one topmenu and one leftmenu on subpages. Settings for DW 7.1.

For topmenu:
<ul id="dwnav" class="dwnavigation" settings="startlevel:1;endlevel:1;template:licleanwithoutecom.xslt;"></ul>


For submenus:
<ul id="dwsubpages" class="dwnavigation" settings="startlevel:2;template:licleanwithoutecom.xslt;"></ul>

<ul id="dwsubnav" class="dwnavigation" settings="startlevel:1;template:licleanecom.xslt;expandmode:All;"></ul>

1. Xslt file, licleanecom.xslt: (includes a static value)
....
<xsl:param name="pageid" select="//NavigationTree//Settings//GlobalTags//Global.Page.ID" />
<xsl:param name="isgroup" select="string(contains(@FriendlyHref,'GroupID='))" />
<xsl:if test="$isgroup = 'true' and $pageid = <PAGEID FOR ECOM PAGE>">
 <li>menutext</li>
</xsl:if>
....


2. Xslt file, licleanwithoutecom:
....
<xsl:param name="isgroup" select="string(contains(@FriendlyHref,'GroupID='))" />
<xsl:if test="$isgroup = 'false'">
 <li>menutext</li>
</xsl:if>
....

 

You must be logged in to post in the forum