Can I use different menus on B2C and B2B landing pages?

Can I use different menus on B2C and B2B landing pages?

CreaWeb
Tourist
7 0 4

Hello,

i know there are similar requests, but none is really answered besides reaching out to an expert.

In our shop basically we want 2 landing pages, one for normal customers and one for wholesale. Each one should have a different menu in the header, because the pages listed in them are specific to B2C or B2B.

Is this possible in any way? I thought maybe if else statement which reacts to the current page and uses a different link list, but i'm not that good with linklists and so on so a little detailed solution would be really awesome.

Thank you very much in advance!

Replies 14 (14)

KetanKumar
Shopify Partner
37095 3645 12054

@CreaWeb 

Welcome to the Shopify community!
and Thanks for your Good question.

Please share your site URL,
So I will check and provide a solution here.

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
CreaWeb
Tourist
7 0 4

the url is hemprider.store

Ninthony
Shopify Partner
2343 354 1039

It's possible to do two different landing pages, but it would all have to be hard coded in and not through your customize editor. The linklist solution is completely doable though.

You can use customer tags to identify who is a wholesale customer and who isnt. You'd go into wherever your navigation is included, probably the header, and just make a conditional statement around it

{% if customer.tags contains "wholesale" %}
  {% assign menu = 'wholesale-menu' %}
{% else %}
  {% assign menu = 'normal-menu' %}
{% endif %}

{% for link in linklists[menu].links %}
  //code to output your menu items.
{% endfor %}
If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish 😄
thepoe09
Tourist
7 0 6

Hi,

I would also like some help with this. I would like to be able to either remove my navigation header or replace it on certain pages within my site. 

 

Is this possible?

 

Thanks

BB_Tech
Excursionist
106 1 6

What would the code in '//code to output your menu items' look like, I have been looking at this problem for a few days now and I cant figure it out 

KetanKumar
Shopify Partner
37095 3645 12054

@BB_Tech 

it can be done some customization code

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

gr_trading
Shopify Partner
1935 146 202

Hi @CreaWeb ,

 

Posting to help others in implementing the same.

Please follow the instruction provided in the below video to implement the same.

 

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
Hectorroa
Shopify Partner
6 1 4

This example works only for pages created out from a collection, not from "pages". 

Does anyone know how to set a different header menu on a different page?

For example, In main page I sell darkroom and photography products so here I have header: Shop, film, Blog and Lab. And in another page I sell prints and books, so I need header menu: Artist, books, prints, and Limited editions.

gr_trading
Shopify Partner
1935 146 202

Hi @Hectorroa ,

 

It works for everything's just you have to write the code for this.

 

We can also write a generic code which will work for product, pages, collection and can be maintained from single place. Let me know if you are interested in that code.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
Hectorroa
Shopify Partner
6 1 4

Thank you, I tried again and worked perfectly.

gr_trading
Shopify Partner
1935 146 202

Glad it helps, request you to like our post and video.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
Linden_Creek
Visitor
1 0 0

I need help on my landing page and show a different menu.

gr_trading
Shopify Partner
1935 146 202

Hey @Linden_Creek ,

 

Video has complete detail how to implement the same, if you want us to implement request you to connect via private msg, email or WhatsApp details are in post footer.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
Ninthony
Shopify Partner
2343 354 1039

You can make any kind of condition you want around the menus similar to their example, you just have to make the right comparisons using the right objects. Most things in liquid have objects you can reference. It really depends where you are to know what template you're using. So what do you mean by "in the main page" do you mean the homepage? In that case the template's name is index, so you'd say

 

 

{% if template.name contains "index" %}
//menu for homepage
{% else %}
//different menu for every other page
{% endif %}

 

 

 

If you're talking about actual pages, meaning they have the "/pages/your-page" extension you can use the pages handle to check:

 

 

{% if template.name contains 'page' and page.handle == "your-page" %}
//the menu you want for that specific page
{% else %}
// the menu you want for every other page.
{% endif %}

 

 

 

So in the above statement it makes sure that you're on a page template, and if you had a page called "Your page" the handle would be 'your-page' -- you can find the handle of your page at the bottom in the SEO portion in the page admin, it'll be whatever the end of the url is:

Ninthony_0-1723501379766.png

If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish 😄