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
  1. Log in as Preston Palmer, the site administrator. Open the Site menu (Product Menu) and click Site BuilderPages.

    The Home and Search page are already in the default site.

    By default there are two pages: Home and Search.

  2. Open the Actions menu next to the Search page and click Delete. Confirm the deletion when the warning menu appears.

  3. Test search after deleting the page. Navigate to the home page and click Search (Search).

    Nothing happens. You deleted the search page, and now the search bar can’t function properly.

  4. Go back to the pages administration page. Click Add (Add) → Page. Click the Global Templates item in the menu and then Search.

    There's a global page template for search pages.

  5. Enter the name Search and click Add. You’re taken to the General page settings.

  6. 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.

    Configure the search page.

  7. Click Save at the bottom of the settings.

  8. 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.

    The search results and facets are part of the search page template.

    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.

  9. Now create the important e-commerce storefront page, where site visitors can buy Clarity’s products. Go back to Pages Administration. Click Add (Add) → Page. Select the Clarity MP page template and enter the name Shop.

  10. 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.

  11. Repeat the same procedure to create these content pages, configured to use the master page:

    • About Us
    • Blog
    • Contact Us
  12. Create a child page of the About Us page, called Careers. Click Add (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:

    There's one nested page in the current hierarchy.

    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:

    The navigation menu displays all the pages except Search.

    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.

Relevant Concepts

Ask

Capabilities

Product

DXP

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy