If we directly insert the content, we will create a new page template for each page of the site. But this is fine since we are not duplicating the header, footer and sidebar. To reduce the number of page templates, we can store our content in a database and use a page ID to identify which page content to insert. This ID is usually appended to our URLs of the website. If we do this, we are creating what is known as a Content Management System (CMS). Where the theme is likely to be changed often or people are encouraged to design new themes, a separate directory can be created to hold the various themes. A read me file could be included to credit the designer, or this information could be added to the start of the style sheet as a comment section.
The two main parts of a template are the content management code and the theme. These should be kept separate so that the theme can easily be changed without affecting the structure. For example, the styles should be defined in an external style sheet and not embedded in the HTML code of the pages. The structure of a website will be defined by a set of templates. It is good practise to make the templates modular rather than having page templates containing all the code for each page. This allows site-wide changes to be easily applied. For example, the footer may be mostly identical between pages.