O'Reilly logo

MODx Web Development by Antano Solar John

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Templating

Templates are the HTML layout within which a requested resource's content is displayed. Templates can themselves be dynamic and can have different elements that show different things, depending on various factors. The content of a template includes dynamic data, whereas the same template shows different content, depending on the resource requested. In this chapter, you will learn about templates and the elements that make dynamic content possible in templates. These are called template variables.

Changing the template of a resource

If you have followed along and have created the front page from the previous example, your website will look like the following screenshot:

Now, to get a practical feel of what templates are all about, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required