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.
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.
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.
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.
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.
Edit the code and replace the sample code with our Hello World HTML.
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.
Navigate to the content folder of your project.
Select New > File . The CMS should now be showing the "Create New File" dialog.
Provide a name for the asset, "Article One" for example.
Pick the template to use for the asset. In this case, pick the "Hello World" template we made previously.
Pick the workflow to use, "Basic Workflow" in our example, is the workflow provided in all CMS instances.
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.