shopify deeply nested menu, where to put? - shopify

Shopify, out of the box, only supports 3 levels deep menus (welcome to 2021).
What is a good approach to implement deeper nested menus?
things that come to mind:
manually sub-nest menus in the theme files.
E.g. create menu
MAIN
and another menu
MAIN1-LVL2
then put the MAIN1-LVL2 like so
MAIN -> MAIN1-LVL2
same with MAIN2-LVL2
Another approach I thought about putting the menu data into settings_data.json
Is there another good way to do that?

The usual way is to create a recursive snippet that will check if there is a menu dropdown OR an another menu with the same menu title and output the links.
So for example if you have:
Navigation Title: Main menu
- Home
- About
- - Company
- - History
- - - Link 1
- - - Link 2
- - People
- Contact
Navigation Title: Company
- Link 1
- Link 2
There will be a standard dropdown for the About and History, but Company will render the second menu called with the same name.
If you are worried that you will have name collision you can prefix the menu with dropdown- and the snippet will check if the navigation has the same title with the prefix.
This is how most premium themes handles mega menus in Shopify.

Related

Passing search and filter parameters between Components

I am trying to implement breadcrum functionality in my application using Blazor.
My requirements are:
Search page - Click search: shows list of items using card
I have a filter box to filter data . e.g posted date, range
When I select a single item, it should go the detail page. On the detail page I should see a breadcrum like - Home -> View -> Detail
So when I click on the View breadcrum item it should take me back to view page with the previous search parameters and filters selected
I know how to pass single parameters between components but little confuse how can I pass multiple parameters to parent and again back to child component. Please advise. Thank you

How can I set up master-detail with existing ContentPages (Xamarin.Forms)?

I'm trying to set up Master-Detail pages in my Xamarin.Forms app to use as a Hamburger sidebar-style navigation menu.
My app is for data entry, and flows in a linear order like this:
Login Page -> Page 1 -> Page 2 -> Page 3 -> Page 4 -> Page 5
I want to use Master-Detail to have a slide-out sidebar menu so you can jump from any numbered page to any other one (e.g. you can be on page 3 and go to page 1, or page 5, etc.) The numbered pages (ContentPages) are already set up with database connections and styling, so how do I implement them into a Master-Detail relationship without creating all new pages and copy-pasting the code across?
Since you have a Login page which needs to be out of the `MasterDetailPage I would suggest you first push it into the Stack something like:
MainPage= new LoginPage(); //Constructor App.xaml
Once you do this follow my answer here and you should be good to go.
Hamburger Menu Xamarin Forms (MasterDetailPage)

Adding two navigation items to one main menu

I'm new to shopify and customizing an existing theme. I was wondering how to do the following.
I have two navigation items (in navigation section of admin):
COLLECTIONS
Men
Women
Kids
-and-
INSPIRATIONS
Casual
Vacation
Weekend
Business
Currently I have two items in my main menu corresponding to COLLECTIONS and INSPIRATIONS (with corresponding dropdowns). I was wondering how to put them both under one main item
SHOP--------------------------------------
COLLECTIONS INSPIRATIONS
Men Casual
Women Business
...
Thanks in advance
Julia
What you are talking about is called "Link Lists" in Shopify. This is what you need to do
Go to Admin -> Navigation and edit menu of "Main Menu"
Add a single item "Shop" and select "All Collections" as the link
Go back to "Navigation" and create a new menu "Shop"
Add two items "Collections" and "Inspirations"
Now you have linked "Collections" and "Inspirations" menu to a parent menu "Shop"
Note: The title of the items inside a menu should always be the same as that of the menu you want to link together.
Refer to this for more details: Create a drop-down menu on my storefront
Next comes displaying submenus inside the menu. Shopify default theme doesn't have this feature out of the box. You can refer to this Shopify thread for implementation: Multi-level menus in Shopify. It is fairly straightforward.

Dynamic Navigation in a XAML Windows Store App

I’m just looking for a sanity check before I go down this road with my Windows Store App.
In the app, I am looking to have a navigation model which involves the following:
All users shown the initial page, and are asked to make a section of Items from a list before tapping continue.
Each Item has a group of pages associated with it – could be 2,3, whatever.
The user is then presented the pages in the order that they are associated with for each Item and in the order by which they selected the Items.
For example, say the user selects Items 2 & 3.
Item 2 has PageA, PageB, PageC associated with it
Item 3 has PageB, PageD, PageA associated with it.
The user journey for the App would be
Selection -> PageA -> PageB -> PageC -> PageB -> PageD -> PageA -> End
The approach I am thinking of going with involves a “UserService” which is persistent throughout the app and stores a list of the Items the user has selected (in order)
I would then have a “PagePlayer” page which would act as a container for the pages to be displayed and this would be loaded after the user is finished with the Selection.
The player would then display all the pages in order based on the Items that were saved in the UserService.
I personally don’t want to go down this road because I know that having Frames displaying Pages etc is generally a bad idea, it could ruin the navigation history etc.
Which pages are associated with each item I would have saved to a local file of some sort and have this loaded when a new Item is set to be displayed.
The number of items are “hard coded” and have IDs associated with them.
I am familiar with Prism for WPF but unfortunately the recently released Prism for Windows Runtime does not support modularity for using a composite approach.
Apologies for general-ness of this question, I couldn’t think of another way of asking it.
Any help would be greatly appreciated!

SharePoint: Programmatically moving pages and subsites on the current navigation menu

Does anyone know how to programmatically move/order the pages and subsites that appear in the Current Navigation when you have the Include subsites and include pages options ticked/enabled?
Background
I have written a class (in c#) which imports content into a new SharePoint site. The newly created subsites and pages all show on the Current Navigation menu as expected, but in the order they were created (I assume). I need to manually sort the pages on the menu so that they appear in the same order as the existing non-SharePoint site.
Issue
The PublishingWeb.Navigation.CurrentNavigationNodes collection does not contain any SPNavigationNode items for the pages and subsites that are automatically displayed on the Current Navigation menu, so I can't use this collection.
I know that to hide a particular page from the menu, you have to update a web property as follows:
web.AllProperties["__CurrentNavigationExcludes"] += page.UniqueId.ToString() + ";";
web.Update();
Is there something similar I can use to order the pages?
Set the Ordering to manual
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.orderingmethod.aspx
Check out the follow up article on this: http://www.thekickboard.com/archive/2010/09/01/programmatically-setting-navigation-order-in-a-moss-publishing-site.aspx
Is this sort of what you are looking for:
http://www.thekickboard.com/archive/2010/09/01/programmatically-setting-navigation-order-in-a-moss-publishing-site.aspx