Developer forum

Forum » Ecommerce - Standard features » EcomNavigation render by ProductID or ParentTag

EcomNavigation render by ProductID or ParentTag

Adrian Ursu
Reply

Hi Guys,

I am trying to list the products categories separated from the main navigation, using the eCom Navigation on a simple page.

Whenever I try to list just the ecom navigation based on PageID (parentid) or Navigation tag (parenttag), the navigation is empty. Nothing is rendered.

If I try to list everything without parentid or parenttag, the eCom Navigation is rendered. But this way I cannot separate the product categories from main navigation.
Apparently the parentid and parenttag are missinterpreted. I have noticed this since version 8.7. I hoped it is solved in 8.8 but unfortunately the simptom is still there (just tried with a new solution).

Anyone had the same problem? Am I missing a special attribute in the navigation call?

This is what I have tried: 

<ul title="Main Navigation" class="dwnavigation navigation-main" id="ProductNavigation" settings="startlevel:1;endlevel:4;parenttag:products;template:LIClean.xslt;expandmode:all">

Nothing fancy.

Thanks,

Adrian


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Adrian

When rendering Ecommerce groups, they will only render if the page they are placed on are also part of the navigation XML. So you need to handle that from your xslt to only render groups. The XML contains information if the node is a page or a group - you can use that to see the difference and not render the pages.

See this thread which explains some of the things that ecommerce navigation does different: http://developer.dynamicweb.com/forum/templates/layoutbased-design-and-ecom-menus.aspx

 
Adrian Ursu
Reply

Hi Nicolai,

I've benn doing this for a while already.

The setup is exactly as in your post.

I have a page that's hidden in the main menu (although I have tried with it Published with the same outcome) and I have set EcomNavigation.

The call is exactly as above, using the default LiClean.xslt.

When I try to save the xml (with savexml=true) the xml is empty. I only thave the Settings section.

You can see it on rtc.dotfusion.ro in the homepage.

My feeling is that this is a bug. Support did not confirm it, they blame it on template, although I have used a very plain template..

I would appreciate your opinion.

Thank you,

Adrian

 
Nicolai Høeg Pedersen
Reply

Hi Adrian

I know it has never worked like that. You cannot use a parent ID of the page that holds the ecommerce navigation settings. That is not and has never been possible. Usually LICLean.xslt (the one distributed with DW) is not the default navigation xslt for ecom navigations as it does not handle ecom groups inpath and active attributes.

The page holding the ecommerce settings has to be in the scope of the navigation XML for the ecommerce provider to be detected and executed.

BR Nicolai

 
Adrian Ursu
Reply

Well, then somethings is off.

I have used a page that's called Catalogue, used only for EcomNavigation. In that page I also have a ProductCatalogue module.

The definition of parentID in the official PDF called Design and Layouts says:
"Limits the navigation to items placed under the page with the ID specified"

The definition for parenttag:

"Limits the navigation to items placed under the page with a specific navigation tag. It works like parentid setting, but where parentid is a unique key, the parent tag can be on several pages in different languages – and the value is language/website context sensitive."

Are they not supposed to work with eComNavigation?

Just to make sure it's not the template, I have tried the template you suggested in that post: LeftNavigationEcomAny.xslt

I am not sure I understand what you mean by "...has to be in the scope of the NavigationXML".

Thanks,

Adrian

 
Nicolai Høeg Pedersen
Reply

No, parenttag and parentid do not work with eComNavigation and never has. That is because the page node it self gets a provider (The ecommerce provider) - that node has to be in the navigation context to activate that provider. So if you set parentid or tag to the page that has the ecommerce provider on it, it will not discover the provider and it will never execute.

So the page with the ecommerce navigation attached to it, has to be in the resulting XML.

 

 
Adrian Ursu
Reply

I see.

Then, it looks like we've always filtered the ecomNavigation starting from the complete navigation.

And that's possible only if the page that has the eCom navigation is not hidden in the menu.

Which means that both ecom navigation and main navigation need to have filtering rules applied to them in the XSLT.

I think I understood it, although it's not straightforward.

Thanks a lot,

Adrian

 
Nicolai Høeg Pedersen
Reply

I do not understand this:

"Which means that both ecom navigation and main navigation need to have filtering rules applied to them in the XSLT." What filtering rules?

It is very simple - you just do exactly like described on that thread. Then you will get a very simple navigation with the groups like you find on wrap.

 

You must be logged in to post in the forum