Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
SD-1297 - Add Documentation For Using Menus (#11054)
Matthew Kennedy24b4773da138
diff --git a/guides/src/content/user/navigation/add_menu_items.md b/guides/src/content/user/navigation/add_menu_items.mdnew file mode 100644index 0000000000..445e2f4341--- /dev/null+++ b/guides/src/content/user/navigation/add_menu_items.md@@ -0,0 +1,79 @@+---+title: Add Items To A Menu+order: 1+---++## Introduction++This part of the guide assumes you have created a menu and are now ready to add some items to the menu items area pictured below; if this is not the case, [click here](/user/navigation/creating_menus.html) to view the guide to creating a new menu.++++To get start adding items to your menu click the Add New Menu Item button found in the top right of the Menu Item Area; once clicked, you will be taken to the New Menu Item page shown in the image below.++You will be presented with three panels, **Settings**, **Public Details** and **Link Settings**.+++++## Settings Panel++The Settings panel contains Menu Item specific settings, such as **Item Type**, **Code** and **Nest Under**.++###Item Type++The Item Type selector allows you to set if this menu item is a **Link** or a **Container** type. Links are used for linking to Products, Taxons and other parts of your website. In contrast, containers are used to group links together, creating organized sections of a menu.++### Code++A menu item code is an optional setting that allows you to identify your link or container for specific uses; for example, if a container has the code of `promo`, links that are nested inside that container will appear as promotion links with large image and the name and subtitle displayed prominently, while links placed within a container with the code `category` will be displayed as standard menu text links.++The image below shows how the Spree Main Menu uses two containers, one outlined in green and the second outlined in red, each container has a code that identifies the links nested inside are to be displayed in different formats.++For more information on using the Spree Main Menu visit the [Building The Main Menu](/user/navigation/building_the_main_menu.html) page.++++### Nest Under++The Nest Under option allows you to quickly nest your new item within other menu items, don't worry; if you forget to nest your new menu item, you can re-arrange the items on the main menu items area,++Using the combination of **Item Type** and **Code** allows you as a designer to create menus of any kind imaginable. An example this would be to set the menu code in the footer view file to look for a container with the code of social; any links nested inside this container would be displayed as SVG icons to your company social media pages.++## Public Settings++Public setting is where your public-facing information is set.++### Name++This is the name used for the link or container displayed in the view.++### Subtitle++The Subtitle used for standard links as the title attribute text, or on promotional items, the subtitle is displayed in the banner.++### Image++You have the option to add a photo or SVG icon to your links or containers as you please. Once an image is added, you also have the opportunity to add image alt text for SEO.++## Link Settings++The link settings panel is where you set the link destination, by default, you are offered the URL field.++### URL+You can enter a URL to an external website such as `https://example.com`. Link to a path in your store by simply setting the path `/some/page`. Or you could set the link to launch an email client or trigger a phone call by entering `mailto:[email protected]` or `tel:123456789`.+++To change the **Link To** option, you will need to select the link you desire, then click **Update** as prompted to load the appropriate link credentials.+++### Taxon / Product+To link to a Taxon or Product, select the desired item from the *Link To* selector and click **Update** when prompted, as shown in the image above.++You will then be presented with a search box that allows you to search for the Taxon or Product you wish to link to. Once set, click **Update**, and the path to item will be displayed under the search field.++++### Home Page++Select **Home** from the **Link To** selector and click **Update**. Your link will now be set to the home page of your store.\ No newline at end of filediff --git a/guides/src/content/user/navigation/building_the_main_menu.md b/guides/src/content/user/navigation/building_the_main_menu.mdnew file mode 100644index 0000000000..e882093f6d--- /dev/null+++ b/guides/src/content/user/navigation/building_the_main_menu.md@@ -0,0 +1,59 @@+---+title: Building The Main Menu+order: 2+---++## Introduction++This guide walks you through building the mega menu found in the Spree demo store, and assumes that you have created a new menu with the location set to Header.++If this is not the case please visit the [Create A Menu](/user/navigation/creating_menus.html) section of+the documentation to create your new menu before continuing.++## Add A Top Level Item++1. Click The **Add New Item** button to take you to the New Menu Item screen.++2. Within the New Menu Item screen enter your desired link name, for this demo we called this link `Women`.++3. Use the Link Setting panel to choose where your link points, you can leave this as a blank URL if you have no products or taxons to link to, and then click **Create**.++4. Click **Main Menu** from the breadcrumbs at the top of the screen to take you back to the **Edit Menu** screen, you should see the following menu item added to your menu.++In the image below you can see that we named our menu item Women and linked to the Women taxon, and the menu item is a link.++++++### Add The Category & Promotions Container++1. Click The **Add New Item** button to take you to the New Menu Item screen.++2. From the options set **Item Type:** `Container`, **Code:** `category`, **Nested under:** `Women`, you can name this menu item anything you like, and then click **Create**.++3. Once your item is saved click **Main Menu** from the breadcrumbs at the top of the screen to take you back to the **Edit Menu** screen.+++The promotions container used in the Spree mega menu is exactly the same as the Catagories container, except it uses the **Code:** `promo`, go ahead and repeat the three steps above replacing the code `categories` with `promo`.++In the image below you can see we now have two containers nested under the Women link that we created earlier, we named our containers **Categories** and **Promotions**, they are of the type container and have the appropriate codes.++++++## Adding Links To Containers++### Add A Link To Categories Container++Adding a link under the categories container is just a case of creating a new menu item as you did before when adding a top level item, only this time from the nest under option you are going to select+Nest Under: `Categories`, if you forget to nest your item while creating it, you can always rearange your items on the menu edit page, and nest the item from there.+++### Add A Link To Promotions Container++Adding a promotion link under the Promotions container is just as easy as adding the link under the Categories container. The only difference is we are nesting this new link under the Promotions container,+and using the **Name** to set the banner name **Subtitle** to set the banner subtitle and Image field to add our promo image.++\ No newline at end of filediff --git a/guides/src/content/user/navigation/creating_menus.md b/guides/src/content/user/navigation/creating_menus.mdnew file mode 100644index 0000000000..68deab60bb--- /dev/null+++ b/guides/src/content/user/navigation/creating_menus.md@@ -0,0 +1,38 @@+---+title: Creating A New Menu+order: 0+---++## Introduction++To create a new menu in Spree, log into the admin and click the Content tab from the admin menu. Within the submenu options, click the Navigation link, you will then be taken to the menus area.++Once you are in the menus area, you will see a button in the top right of the screen + Add New Menu, click this button to create your first menu.+++++++## New Menu Options++Once you have entered the New Menu screen, you are presented with four options.++++* **Name:** You must give your menu a name; the menu name is not displayed in the frontend store view, so feel free to name your menu something you can quickly identify.++* **Store:** Each menu belongs to one store; set the store that you want this menu to appear in.++* **Location:** Choose the location of your menu. By default, you are offered the choice of Header or Footer; if you wish to add more options, click here to view the developer docs.++* **Locale:** Each Menu is unique by **Store**, **Location** and **Language**; for example, you can not have two menus for your **Default Store**, that both appear in the **Header**, and+both use the language **English**.++Once you have familiarized yourself with the options above, populate each field as required and click **Create**.++Upon creating your first menu, you will be presented with a Menu Items Area; this is where you organize the links of your menu.++++View the [Add Items To A Menu](/user/navigation/add_menu_items.html) page of the Navigation documentation to begin adding items to your new menu.\ No newline at end of filediff --git a/guides/src/content/user/navigation/index.md b/guides/src/content/user/navigation/index.mdnew file mode 100644index 0000000000..09b5c14261--- /dev/null+++ b/guides/src/content/user/navigation/index.md@@ -0,0 +1,11 @@+---+title: Navigation+---++The Navigation section of the Admin / Content interface will allow you to create navigational menus for your stores.++In this section of the documentation, you will learn how to:++* [Create A Menu](/user/navigation/creating_menus.html)+* [Add Items To A Menu](/user/navigation/add_menu_items.html)+* [Build The Main Menu](/user/navigation/building_the_main_menu.html)diff --git a/guides/src/images/user/navigation/categories.jpg b/guides/src/images/user/navigation/categories.jpgnew file mode 100644index 0000000000..931bd78443Binary files /dev/null and b/guides/src/images/user/navigation/categories.jpg differdiff --git a/guides/src/images/user/navigation/container_code.jpg b/guides/src/images/user/navigation/container_code.jpgnew file mode 100644index 0000000000..fde0e547b2Binary files /dev/null and b/guides/src/images/user/navigation/container_code.jpg differdiff --git a/guides/src/images/user/navigation/empty_menu_page.jpg b/guides/src/images/user/navigation/empty_menu_page.jpgnew file mode 100644index 0000000000..e77066d02cBinary files /dev/null and b/guides/src/images/user/navigation/empty_menu_page.jpg differdiff --git a/guides/src/images/user/navigation/link_to.jpg b/guides/src/images/user/navigation/link_to.jpgnew file mode 100644index 0000000000..86ced1d665Binary files /dev/null and b/guides/src/images/user/navigation/link_to.jpg differdiff --git a/guides/src/images/user/navigation/link_to_taxon_set.jpg b/guides/src/images/user/navigation/link_to_taxon_set.jpgnew file mode 100644index 0000000000..bb6176b9ffBinary files /dev/null and b/guides/src/images/user/navigation/link_to_taxon_set.jpg differdiff --git a/guides/src/images/user/navigation/links_added.jpg b/guides/src/images/user/navigation/links_added.jpgnew file mode 100644index 0000000000..d98abe7c2aBinary files /dev/null and b/guides/src/images/user/navigation/links_added.jpg differdiff --git a/guides/src/images/user/navigation/menu_items_area.jpg b/guides/src/images/user/navigation/menu_items_area.jpgnew file mode 100644index 0000000000..98af16d660Binary files /dev/null and b/guides/src/images/user/navigation/menu_items_area.jpg differdiff --git a/guides/src/images/user/navigation/new_menu.jpg b/guides/src/images/user/navigation/new_menu.jpgnew file mode 100644index 0000000000..a8aead6ea2Binary files /dev/null and b/guides/src/images/user/navigation/new_menu.jpg differdiff --git a/guides/src/images/user/navigation/new_menu_item_page.jpg b/guides/src/images/user/navigation/new_menu_item_page.jpgnew file mode 100644index 0000000000..6aebb426abBinary files /dev/null and b/guides/src/images/user/navigation/new_menu_item_page.jpg differdiff --git a/guides/src/images/user/navigation/women.jpg b/guides/src/images/user/navigation/women.jpgnew file mode 100644index 0000000000..852e21fa7dBinary files /dev/null and b/guides/src/images/user/navigation/women.jpg differ