Modular Content

Modular content in XperienCentral makes it possible for you to create new custom content item types as well as create content item templates containing default fields. This makes it possible to reuse content types that already contain the content you want.

In This Topic



Modular Content Templates

Modular content templates have two different functions:

  • When coupled with a modular content type, the modular template's properties become custom properties on the "Basic" tab of the Properties Widget for that content type.
  • They can be added to a content item using the Modular Content Element. This makes it possible to reuse the set of properties defined for a template throughout your channel instead of having to create it over and over.

The Modular Content Templates tab shows a list of the existing templates. The following information is shown for each template:


ColumnDescription
NameThe name of the modular content template.
ElementsThe number of content elements that have the template assigned to them.
Content ItemsThe number of content items that have the template assigned to them.
ActionsA "Delete" icon appears for templates which you are allowed to delete.



Creating a Modular Content Template

Follow these steps:

  1. Click [Add Template].
  2. In the Name field, enter a string that will be used within XperienCentral to identify the template.
  3. Enter a string for the identifier. The identifier must be unique.



Adding Properties to a Modular Content Template

To add a property to a modular content template, follow these steps:

  1. Click [Add Property]. A new entry is added to the list of properties.
  2. Enter a string in the Name field to identify the property.
  3. Enter a string in the Identifier field that will be used to uniquely identify the property within XperienCentral.

    Once you have entered a string and saved the template, the identifier can no longer be modified, therefore be sure to plan out carefully beforehand what your scheme is for template identifiers.

  4. Select the property type from the drop-down list. The options are:

    TypeDescription
    StringA field that accepts any string of characters. The input field can be either a single line or a multiple line field. Which kind is determined by the Subtype field defined in the next step.
    BooleanA checkbox that can either be selected or cleared. A Boolean cannot be defined as "Multiple".
    IntegerA single line field that accepts a positive or negative integer (no decimal points). An Integer cannot be defined as "Multiple".
    DateA date picker which can be used to select a date. The Subtype field defined in the next step determines whether the field selects a date or a combination of date and time.
    ImageA Browse button which you can use to select an image.

     


  5. Select the subtype of the property from the drop-down list. The options are:

    Property TypeSubtypes
    StringStringSingleLine - A single line field.
    StringMultiLine - A field that accepts multiple lines of strings.
    BooleanBooleanCheckbox - A checkbox that can be either selected or cleared.
    IntegerIntegerInputField - A field that accepts any positive or negative integer (no decimal points).
    DateDateDateOnly - A date picker that you can use to select a day, month and year.
    DateDateTime - A date picker that you can use to select a day, month and year and a field that accepts any valid time (24 hour notation).
    ImageImageUploadOrSelect - a [Browse] button that you can use to select an image file from disk.



  6. Select whether the property can contain multiple values. Property types Boolean and Integer cannot contain multiple values.
  7. Define the search facet settings.
  8. Enter one or more CSS class(es) in the Context Classes field in a whitespace separated list.

  9. Enter text in the Help text field. The help text you define appears under the field in the Modular Content element. For best results, make sure the help text provides sufficient guidance for the user filling in the field.
  10. Click [Save].

Reordering Properties in a Template

To reorder the properties in a template, simply point your mouse to the left of the name of the property, click and hold the left mouse button and then drag the property up or down.

Deleting Modular Templates

To delete a modular template, follow the steps below. A Modular Template can only be deleted if it is not being used by a Modular Content Type or a Modular Content element.

  1. Hover the mouse over the "Actions" column next to the Modular Template until the delete icon appears. For example:



  2. Left-click the delete icon.
  3. Click [OK] to confirm.


Back to top



Modular Content Types

Modular content types are custom content items that XperienCentral uses to deliver content. They are based on a modular content template that determines how the content is structured. When in an active state, you can create content based on the different types using the Create Content drop-down in the sidebar headers or using the Create Content Widget in XperienCentral versions R31 and lower.

To create a new modular content type, follow these steps:

  1. Click the "Modular Content Types" tab to select it.
  2. Click [Add Content Type].
  3. Define the following properties for the new modular content type:

    PropertyDescription
    Name en_USThe string that identifies the modular content type in the English user interface of XperienCentral.
    Name nl_NLThe string that identifies the modular content type in the Dutch user interface of XperienCentral.
    IdentifierA single word identifier used by Java to identify the modular content type.
    Used templateThe modular content template to use for this modular content type. The properties defined in the template will by default appear in the content type on the website frontend.
    Description en_USAn alphanumeric string of at least 3 characters to use for the description of the modular content type in the English user interface of XperienCentral.
    Description nl_NLAn alphanumeric string of at least 3 characters to use for the description of the modular content type in the Dutch user interface of XperienCentral.
    Extend content typeSelect the media item type this content type should extend.
    Icon set (small)Click [Browse] to select the file containing the set of small icons for the modular content type. The icon appears in the Create Content drop-down in the sidebar headers or in the Create Content Widget in XperienCentral versions R31 and lower.
    Icon set (large)Click [Browse] to select the file containing the set of large icons for the modular content type. The icon appears in Advanced Search.
    StateSpecifies the current state of the modular content type (active or inactive). You select the state of the modular content type in the "State" column of the list of modular content types.

     

  4. Click [Save].
  5. Click [Close]. The modular content type is created and appears in the list.

Changing the State of a Modular Content Type

To change the state of a modular content type, follow these steps:

  1. Click "Modular Content Types" to display the list of available modular content types. If you are in the definition panel for a modular content type, click [Close] to access the full list.
  2. Move the slider to the left or right to change the state of the modular content item. For example:




    Once a modular content type is activated, it becomes available in the Create Content drop-down in a sidebar header or use the Create Content Widget in XperienCentral versions R31 and lower.


Deleting a Modular Content Type

To delete a modular content type, follow the steps below. A modular content type can only be deleted if it is in the inactive state and there exist no content items based on it.

  1. Click "Modular Content Types" to display a list of the types.
  2. In the Actions column to the right of the modular template type, click the Delete icon. For example:




  3. Click [OK] to confirm the action.


Modular Content Type Properties

The properties of the template that is linked to a modular content type appear for that content type in the "Basic" tab of the Properties Widget. For each instance of the modular content type you can fill in the template properties to further identify/describe it. For example:



If a template property is defined as a search facet, it will appear in Advanced Search if/when a value is defined for it. See below.

Image Preview and Metadata

For the Modular Content "Image", an editor can upload an image in a Modular Content content element. Once an image has been uploaded, you will see a thumbnail preview as well as the following metadata for it:


MetadataDescription
File NameThe (operating system) name of the file containing the image. Click the file name to download the image.
File TypeThe image type.
SourceSpecifies the source of the image.
DimensionsThe height/width dimensions of the image in pixels.
File SizeThe size of the image file in kilobytes (KB).
Focus PointSpecifies whether a focus point has been defined for this image. To define a focus point, click [Select Focus Point]. If the image already has a focus point defined for it, click [Edit Focus Point]. See Defining the Focus Point for an Image for complete information on defining a focus point for an image.

To upload a different image from a file on a local disk, click [Browse]. To upload an image from the Content Repository, click [Select from Content Repository]. To delete an uploaded image from a Modular Content content element, select "Delete" and then click [Apply].


Back to top



Modular Content Template Properties as Search Facets


The ability to add modular template properties as facets in Advanced Search was introduced in XperienCentral R30.


It is possible to register a modular content template property as a search facet. When you do so, the facet can be searched for in Advanced Search. There are two types of facet definitions:

  • Unique - there is one facet that allows you to search for values for a unique property in one content item type.
  • Combined - there is a property that appears in two or more content item types that can be searched for.

To register a property as a search facet, follow these steps:

  1. Expand the "Search index" drop-down list under the template property.
  2. lect the facet definition for the property. The options are:

    OptionDescription
    DisabledThe property is not used as a search facet and no Solr document field is created.
    Unique without facetCreates a Solr document field for the property but no facet.
    Unique with facetCreates an Advanced Search facet and a Solr document field for the property. Values of this property will always be shown as a unique facet in Advanced Search and it will not contain values of other properties from other templates,
    Combined without facetCreates a Solr document field for the property but no facet. If another property in another template has the same identifier and its search facet is also set to "Combined without facet". the values of these properties will be shown in a single, combined, facet when the above circumstance is met.
    Combined with facetCreates an Advanced Search facet and a Solr document field for the property. If another property in another template has the same identifier and its search facet is also set to "Combined with facet", the values of these properties will be searchable as a single, combined term when the above circumstance is met.
  3. Select "Multiple" if you want to allow multiple values for the facet to be searchable.
  4. Click [Save].

Solr Document Fields

If a template property is set to unique (with or without facet) or combined (with or without facet), a new Solr document field is added for the property in the content item using the current Modular Template, either a modular content type based on this template or a page with this template assigned as page metadata. The name of the resulting Solr document field depends on the search facet type:

  • Unique - wmamodularcontent0[template identifier]0[property identifier]
  • Combined - wmamodularcontent0[property identifier]

Because combined facets are not template-specific, the template identifier is not part of the field name. Unique facets are template specific, which is why the template identifier is part of the field name.
The Solr document field search facets can hereafter be used in Solr queries. For example, the query

q=(webid:${website.id}^0)&q.alt=*:*&defType=edismax&mm=1&rows=0&facet=true

retrieves all facets. The query

&facet.field=facet_research_institute&fq=facet_research_institute:"waarde"

retrieves the facet "research_institute".


In JSPs, you have to escape the quotes and URL encode URL value using the character &. For example:


&facet.field=facet_research_institute&fq=facet_research_institute:\"${wmfn:urlEncode(selectedResearchInstitute)}\"


Modular Content Template Property Unique Search Facets Example

Modular Content Template Configuration



The name of the modular content template is "Products". It has one property "Brand" and the "Search index" type is set to "Unique with facet".


Modular Content Type "Product" Definition



A modular content type named "Products" is created that uses the modular content template "Products".


Create two "Product" Content Items



Select "Products" from the the Create Content drop-down in a sidebar header or use the Create Content Widget in XperienCentral versions R31 and lower.


Properties for the "Minolta" Product



One "Products" content item named "Minolta 10x40 Binoculars" is created and it has "Minolta" as its value for the "Brand" property (search facet).

Properties for the "Pentax" Product



The other "Products" content item named "Pentax Classic Wide Field" is created and it has "Pentax" as its value for the "Brand" property (search facet).


Result in Advanced Search



In Advanced Search, the facet "Brand" is shown and can be expanded. It has two values, "Minolta" and "Pentax", which correspond to the properties defined in the Basic tab of the Properties Widget.


Modular Content Property Combined Search Facet Example

Modular Content Template "Products" Configuration



A modular content template named "Products" is created.


Modular Content Template "Services" Configuration



A modular content template named "Services" is created.


Modular Content Template "Product" Properties



The property "Exportable to EU" with the identifier "eeu" and search index "Combined with facet" is created for "Product".

Modular Content Template "Services" Properties



The property "Exportable to EU" with the identifier "eeu" and search index "Combined with facet" is created for "Services". Note that the identifier for "Exportable to EU" is identical for both properties ("eeu").


GX Software recommends that you always use the same name for properties that have an identical identifier. The reason for this is that when the facet appears in Advanced Search, only one of the facet names will appear and it will contain the results of the combined facets. It might be confusing for an editor to see a facet in Advanced Search that doesn't clearly describe its target content.


Modular Content Type "Products" Definition



A modular content type "Products" is created that uses the modular content template "Products".


Modular Content Type "Services" Definition



A modular content type "Services" is created that uses the modular content template "Services".


Create a "Products" Content Item



A "Products" content item is created using the Create Content drop-down in a sidebar header or use the Create Content Widget in XperienCentral versions R31 and lower.


Create a "Services" Content Item



A "Services" content item is created using the Create Content drop-down in a sidebar header or using the Create Content Widget in XperienCentral versions R31 and lower.


Properties of "Products" Content Item


In the properties for the iPhone 11 "Products" content item, "Exportable to EU" is selected.


Properties of "Services" Content Item



In the properties for the Personalization "Services" content item, "Exportable to EU" is selected.


Combined Facet in Advanced Search



In Advanced Search, two content item types, which are different, are found when the facet "Exportable to EU" is set to "true".


Back to top



Exporting Modular Content

See Exporting Modular Content.