Creating Content Manager items
Schemas, Component Templates, and Components are the Tridion representations of elements that appear on your Web site Pages. Create these Content Manager Items to enable Editors to manage the Web site element from within the Content Manager.
Procedure
- Create a Schema to represent your Web site element:
- In the General tab, enter:
- Name—Special Offer
- Description—Special Offer
- Schema Type—Schema
- Root Element Name—SpecialOffer
Note: It is good practice to provide a meaningful name for Root Element Name as it can be useful for advanced View Model semantics. - In the Design tab, add the following fields:
- headline type Text
- image type Multimedia Link
- description type Text
- link type Component Link
- In the Metadata tab, add the following fields:
- expiryDate type Date
Note: It is good practice to match the XML Names of the fields with the property names in your View Model and important when implementing advanced View Model semantics. The naming convention for XML Name is a lower case first letter.Note: Before you create any content using this Schema, update the namespace to something meaningful and unique to your organization so that you can use it later for advanced semantic mapping. Internally DXA uses the following namespaces:http://www.sdl.com/web/schemas/corefor Schemas in the Core andhttp://www.sdl.com/web/schemas/moduleNamefor Schemas for a particular module. - In the General tab, enter:
- Create a Component Template based on this Schema:
- In the Editor Folder of your work area, create a new Component Template called Special Offer. You can do this by copying an existing Component Template or creating a new one in Template Builder.
- In Template Builder, add the Render Component Content and Default Component Template Finish Actions Template Building Blocks from the set of Core Template Building Blocks.
- Open the Component Template in the Content Explorer and go the Linked Schemas tab.
- Remove any Schemas if you created the template by copying another and add the Special Offer Schema.
- Save and Close.
- Add MVC metadata to the Component Template:
Add metadata to the template so that the Web application understands the relationship between Content Manager Templates and Web application Views.
- Open the MVC Metadata Schema in the Metadata Schema dropdown.
- In the General tab, enter an Entity View Name which matches the Area and View names that you created previously. For example:
- Refresh the Web application settings:
- Go to the Home/_System Structure Group.
- Select the Publish Settings Page and click Publishing > Publish.
- Go to your Web application and enter the URL /admin/refresh refresh the cache and reload the settings in the Web application.
- Create example content:
- Create Components that use the Special Offer Schema.
- Add the Components to a Page.
- Publish the Page.
Browse to the Page in your staging Web site to ee your example content rendered with the new View.
- SDL Digital Experience Accelerator Core Template Building Blocks
DXA provides default Template Building Blocks (TBBs) to use when creating Compound Templates in Template Builder.