Developers
cancel
Showing results for 
Search instead for 
Did you mean: 

DXM Template Development Training

Template Development: Hello World

 

Transcript

First, let’s see how to do this using visual studio.

Make sure you have the Crownpeak Desktop Connection installed and that you have the plug-in configured to connect to your CMS instance. I’m using the TrainingAndDemos instance for the purposes of this demonstration.

  1. Navigate to the "Templates" folder in the CDC File Explorer panel. You could be using the local Templates folder of a "Sites and Projects" implementation.
  2. Right-click on the folder and select New > Template C#. You will be prompted for the new template name - we will use "HelloWorld" in this case. Once that is done, you will see a new folder in the tree view.
  3. Opening the new folder will show you two template files input.aspx and output.aspx . These are the default template files the CMS creates for you.
  4. Double click output.aspx to open the file in Visual Studio. You will see a couple of lines of boilerplate template code that handles imports and the like at the top of the file.
  5. Edit the code and replace the sample code with our Hello World HTML.
  6. Once you have done this, save the file.

The next thing we need to do is create an asset that uses the new template.

It is best to use the CMS interface for the next few steps.

In this example, we're using the Crownpeak V3 interface.

  1. Navigate to the content folder of your project.
  2. Select New > File . The CMS should now be showing the "Create New File" dialog.
  3. Provide a name for the asset, "Article One" for example.
  4. Pick the template to use for the asset. In this case, pick the "Hello World" template we made previously.
  5. Pick the workflow to use, "Basic Workflow" in our example, is the workflow provided in all CMS instances.
  6. Finally, click Create to complete the process. In the "File View", double click the newly created asset to show the output view and we should see our "Hello World" message.
Labels (2)
Version history
Revision #:
2 of 2
Last update:
‎05-30-2019 08:26 PM
Updated by:
 
Contributors
Looking for more?
Ask in Discussions
Developers

Peer-to-peer support  and answers on developing CMS templates, modifying privacy scripts or building integrations.

Digital Experience Management

Find answers and ask questions on content management, personalization and targeting.

Digital Quality Management

Find answers and ask questions on WCAG and SEO quality management.

Digital Governance

Find answers and ask questions on consent and monitoring solutions.