Is it possible to combine ecommerce and content pages in the main navigation without custom coding?
Developer forum
E-mail notifications
Combine ecommerce and content navigation
Replies
Yep. You can enable Ecom Navigation for a page: https://doc.dynamicweb.com/documentation-9/content/content/pages#sideNavTitle1-4-2
Yes, I have that enabled, but then i ONLY get the ecommerce structure. I want to show the ecommerce structure first, then a few content pages to the right or left of the ecommerce structure.
Doesn't it mix the two? Let's say you have this structure:
Home
Products
About us
and then enable ecom navigation for Products, your menu could end up like this:
Home Products About Us
Group 1
Group 2
Is that what you are looking for?
Almost, but not exactly. I would like it to be like this:
Home Group 1 Group 2 About Us Subgroup 1 Subgroup 1 Subgroup 2 Subgroup 2
I see. I am not sure, but I don't think you can do that out of the box. Two possible solutions:
1. Creates pages named after the top groups and add ecom navigation for each of them. Makes it difficult to include new groups automatically.
2. Update the XSLT file to ignore the top level Products node and promote the first level of sub groups to top level nodes. That does require programming xslt though.
We have a similar requirement, that is to add new submenus linking to standard pages.
Group 1 Group 2
Subgroup 1a Subgroup 2a
Subgroup 1b Subgroup 2b
Link_to_page_1 Link_to_page_2
Should we modify the XSLT or is there any easier solution?
BR,
Tomas
Hi Tomas,
Imar's suggestions are probably the only ones.
You can create one page for each top level group (Group1 and Group2) and set ecommerce navigation on both of them, selecting the subgroups you want. Then, create content pages under each of the top level pages created previously. They should now show up in the menu after the ecom groups. This indeed makes it hard to add new subgroups on the menu as you need to create them manually everytime you have a new one. The alternative would be to have a mirrored Group in the ecommerce section (Group1 and Group2) and assign the parent groups to the ecommerce navigation. This means that any additional subgroup will show up automatically. But, you have to be careful about the URLs as this scenario will create a link like this: Group1/Group1/Subgroup1/Product1. THat's becuase the URL provider will add both the page url and the top group URL. If they have different names and it makes sense to keep it like this, it's fine. But if you want to avoid it, you need to check the Ignore parent groups in URL on every subgroup. And this should get you a correct URL.
I hope this helps.
Adrian
Thank Adrian!
Good explanation, to emulate the ecomm with content pages would be a very much winding and non-dynamic alternative (it would require manual synchro between menus and products groups). I also agree that Imar suggestion is much cleaner.
BR,
Tomas
You must be logged in to post in the forum