Developer forum

Forum » Ecommerce - Standard features » Ecom Group-specific template

Ecom Group-specific template

Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Hello

Stupid question maybe; but is it possible to render different pages / templates depending on what ecom group you are in when using ecom navigation?

With the standard swift, you can specify a product list info, and banner for the group, but I would like to be able to render a different page depending on which group I am in. Some groups may have no products in them, but I still want some rich content at the top of the page, that always shows.

Cheers

Steve


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

You could set the Primary Page on an Ecom group: 

More info: https://doc.dynamicweb.com/documentation-9/ecommerce/product-catalog/product-groups#sideNavTitle1-2

Does that give you what you need?

 

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Hi Imar.

No not really. 

The primary page determines what page is used to render product details page for the products in that group.

I am trying to change the layout of the group page itself, regardless of wether or not there are products in that group.

So if I navigate to for example

http://mysite.com/products/clothes  (clothes is en ecom group containing no products) - I stil want a layout that introduces the various clothing lines, shows some brand icons etc etc, even if product list is empty

but then down into 

http://mysite.com/products/clothes/nike   (has products) shows nike branded group page with product list at bottom

There are a couple of standard ecom group settings such as group image and group name which can be used in the product list page, but cant see anyway where I can just "include a page". Maybe I would like to use a "nike-branding" page at the top of the nike ecom group, and not just "Nike" name, and "Nike image" which I can do with standard swift template. I want a seperate page I can refer to and load above of the product list for that group

Does this make sense? 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Stephen

True - we do not have that feature.

If you want to try to make a customisation of this, you can create a custom field on a group - e.g. "Branding page" which is a link. Then you can select a link to that page.

Then in the template Swift uses to render the group information, e.g. name and image, you can call @RenderGrid() where you pass in the pageid from the "Branding page" field on your group if one is found.

This way you can relatively simple create branding pages and include them on the product list. You will have to ensure the right markup structure as this rendergrid will run inside a column of another grid, but Boostrap does support that - but that is probably the most difficult part.

BR Nicolai

Votes for this answer: 1
 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Hei Nicolai. Perfect. Thats exactly what I was looking for.

Will give it a try when I get the chance

 

You must be logged in to post in the forum