Completing the Site Structure
Now that the home page is in place and the master page defines the header and footer, you can create the rest of Clarity’s pages:
- Home
- Shop
- Blogs
- About Us
- Contact Us
- Careers
-
Log in as Preston Palmer, the site administrator. Open the Site menu () and click Site Builder → Pages.
By default there are two pages: Home and Search.
-
Open the Actions menu next to the Search page and click Delete. Confirm the deletion when the warning menu appears.
-
Test search after deleting the page. Navigate to the home page and click Search ().
Nothing happens. You deleted the search page, and now the search bar can’t function properly.
-
Go back to the pages administration page. Click Add () → Page. Click the Global Templates item in the menu and then Search.
-
Enter the name Search and click Add. You’re taken to the General page settings.
-
Enable Hidden from Menu Display. This excludes the search page from the Menu Display widget’s page hierarchy. It still appears in other navigation menus.
Leave Inherit Changes enabled, so that changes made to the template are reflected on the search page.
The friendly URL can be changed, but leave it as
/search
. The Search Bar widget is configured to use this friendly URL as its destination page, directing the user to the search page after a search is executed. -
Click Save at the bottom of the settings.
-
Navigate to the home page again. Enter test in the search bar again and click Enter. The search page appears. Whether you see results and facets depends on the content in your system and whether you have permission to view the content.
Consider why this search worked. You added a search bar widget to the master page’s header and a search page in the site. How did the search bar know to send you to the search page? It’s all in the configuration. The friendly URL of a page named Search defaults to
/search
, and the search bar configuration uses the same value in its Destination Page setting. The search page’s friendly URL must match its search bar’s Destination Page setting. -
Now create the important e-commerce storefront page, where site visitors can buy Clarity’s products. Go back to Pages Administration. Click Add () → Page. Select the Clarity MP page template and enter the name Shop.
-
In the content page editor, click Publish. The header and footer you defined for Clarity are now in place.
The content for this page is defined in the Commerce Architect course.
-
Repeat the same procedure to create these content pages, configured to use the master page:
- About Us
- Blog
- Contact Us
-
Create a child page of the About Us page, called Careers. Click Add () next to About Us, and then follow the same page creation procedure. You can also drag existing top-level pages onto other pages to nest them.
The site hierarchy looks like this, from the pages administration panel:
Now go to the Home page and observe that these pages are added automatically to the navigation menu provided by the site header’s Menu Display widget:
Recall that you excluded the search page from appearing in the page hierarchy menu of the Menu Display widget. That’s why it doesn’t appear in the navigation.
Excellent! Clarity’s basic pages are in place.
Next: Clarity needs a new Sign In page.