Skip to main content
All CollectionsFeatures
Reference Fields
Reference Fields
Updated over a year ago

Overview

Reference fields allow you to populate content from a CMS group to Templates, Pages or Frames. For example, you may choose to Select Manually specific "related" products to display on a product landing page, including title, image and link to page; or you may dynamically Select All blog posts to display on your blog index page and then order those posts by date.

Creating a Reference Field

To leverage the power of Reference fields, you must first create a Section with a Reference variable type. To do this, add a Reference variable type to your Section in the Shogun Frontend IDE (image below). You can select multiple values to display multiple content items from the specified content type, or display a single item. Content Type corresponds to your CMS content group.

512

Adding CMS content to your Section

In the Experience Manager, you may add a Section to your Template, Page or Frame. For any Section with a multi-value Reference field, you will have the option to Select All or Select Manually to specify which CMS content items should be added to this Section.

2000

Select All

Select All allows you to add all content items from the specified content group. The Select All option gives you dynamic functionality. Shogun Frontend currently supports the following dynamic functionality:

  • Select all content items from a content group

  • Sort all content items by Date, ascending or descending

  • Include or exclude draft content items from a content group. Draft content will only be displayed at your discretion

  • Automatic population of new content items to the specified content group. Newly created content will only be visible on the live site when when published.

  • Automatic sorting and ordering of newly added content items to the specified content group—if Sorting and Ordering criteria are selected and if date value provided

Sort by Date

2000

To sort your content items by date, follow the steps below:

1. Create a Date field type

In the CMS, add a new Date field type to your content group with a label of your choosing. This field will then be editable for each content item within your content group.

🚧 The Date field is offered specifically to help determine the order in which your content is displayed. It will not be shown in the Experience Manager in the same way other fields are shown and will not be available for development in the IDE.

2000

2. Add the date value

In the CMS, populate the date for each content item following the format MM/DD/YYYY.

1780

3. Select Sort Criteria

In the Experience Manager, select the Date field type, by label, that you would like to use to sort your content items. You will see Displaying (#) items, which indicates the total number of content items displaying . This number will update in real time, as you filter and sort your content items.

656

4. Select Order criteria

You may choose to display your content items by Newest first or Oldest first.

658

5. Limit Results

You can limit the number of content items to display in your page.

330

6. Include Draft Content

You can include or exclude draft content items from displaying.

When you create a Template in Shogun Frontend, you will connect your Template to a CMS content group. Then, the Template will generate a unique page for each content item in the content group.

When the Include Draft Content toggle is on, content from all of the pages, including those in Draft state, will be included. When the Include Draft Content toggle is off, content from the pages in Draft state will not be shown.

327

🚧 If turned on, make sure you publish all content to prevent broken links.

Select Manually

Select Manually allows you to add one or more content item from the specified content group. The Select Manually option offers the following functionality:

  • Select one or more content items from a content group

  • Drag and drop content items in any order

  • Search the content group for specific content items

1. Select one or more content items

Select one or more content items from your content group to display them in your page.

332

2. Drag and drop

You may drag and drop selected content items to display in a specific order.

326

3. Search for content items

You can search your specified content group for content items.

652

Clear content selection

To clear all content items selected, click the Clear button in the top right corner of the section variable in the Experience Manager sidebar.

658
652
Did this answer your question?