XML Templates

Test Your Knowledge

Exercise: Create an XML template with multiple-content areas

  1. Create an XML template and save it.
  2. Create a page with this XML template.
  3. Preview the page and publish it.
  4. Add several content placeholders in the template.
  5. Create another XML template with several content placeholders, too.
  6. Try switching between these two templates on pages.
  7. View the content in the different content areas of the page.

Note:Ifthecontentdisappears,makesureyouarenotusingdifferentIDs.

Exercise: Use external CSS, JavaScript and media files in XML templates

  1. Upload CSS, JavaScript and image files you are going to use in XML templates to the server.
  2. Edit an XML template and insert links to these files.
  3. Make sure that these links will be correctly processed on the front-end.
  4. Create a page based on this template.
  5. Preview the page and make sure that the resource files you linked to in the template are rendered and used properly.

Exercise: Localize an XML template

  1. Make sure you have two languages installed on your website.
  2. Create an XML template with some content, which includes some text and images.
  3. Localize the text by using .NET resource files and a proper XML template element.
  4. Localize the use of images in the template by specifying different images for different languages.