Develop the Products Feature Part 1: Document Type

Previous Step

Add the Secondary Navigation Menu to the About Page

This section guides you through creating the Products feature, starting with defining the Product document type and content bean.

Product Document Type

Review the web design for the Products Overview and Product Detail pages. Identify the properties displayed for each product:

  • Title
  • Price
  • One or more images
  • Introduction (short description shown in the products overview)
  • Description (long description shown on product detail pages)
  • Rating (not included in this sprint)

Access Bloomreach Content at http://localhost:8080/cms/. Log in as user admin with password admin.

Open the Content application and select Document Types from the dropdown menu.

Add a new document type to the gogreen namespace. Use the context menu to select New document type.

Document Types menu showing New document type option

In the dialog, enter the name product and leave the supertype set to the default value basedocument. Click next.

New document type dialog with product name and basedocument super type

Select the 1 Column layout for the new document type. Click finish.

New document type dialog with 1 Column layout selected

The document type editor opens. Add the following fields:

Field TypeCaptionPathRequiredMultiple
StringTitletitleyesno
Decimal NumberPricepriceyesno
TextIntroductionintroductionyesno
Rich Text EditorDescriptiondescriptionyesno
Image LinkImagesimagesyesyes

Click Done to save and close the editor.

From the Type Actions menu, select Commit to activate the new document type.

Open the setup application at http://localhost:8080/essentials/.

In the Tools section, use the Template Query Generator to generate template queries for the product document type. Template queries control which document types can be created in specific folders. For more details, see Controlling Allowed Document Types in a Folder.

Template Query Generator with Document and Folder buttons for product

Click the Document button for product, then the Folder button for product to generate the template queries.

CMS notification confirming document template query creation

Return to the CMS. In the Content application, select Images from the dropdown in the left column. Add a new folder named products under the root image folder GoGreen.

Upload product images from the web design, for example:

  • binaries/content/gallery/products/smcenturian_detail.jpg
  • binaries/content/gallery/products/lifeproof-ipad-case.jpg
  • binaries/content/gallery/products/family-tent.jpg

Next, select Documents from the dropdown in the left column. Add a new translated folder named products under the root content folder GoGreen.

Open the context menu for the products folder and select Edit allowed content...

Context menu for products folder with Edit allowed content option

In the dialog, remove the two default template queries (Add new translated... folder and Add new document...). Use the dropdown to add these two queries:

  • Add new product folder...
  • Add new product document...

Edit allowed content dialog for products folder

Click OK to save. The products folder is now configured so only product documents can be created in it and its subfolders.

Create product documents in the products folder and publish them.

Use product names and images from the web design, for example:

  • Solar Centurian - Outdoor Security Light
  • Lifeproof nüüd IPad Air Case
  • MEC Lodge 4+4 Tent

Bloomreach document editor showing MEC Lodge 4+4 Tent product

Next Step

Develop the Products Feature Part 2: Products Overview Page

Share Feedback
Page: /getting-started/build-a-website-tutorial/develop-new-features/products-part-1-document-type
Section: Getting Started
Category *
Products Part 1: Document Type | Bloomreach Content Documentation