I am trying to build a site that uses one or two php templates for the site's design and then have all the content loaded from xml files. What is generally considered to be the best way to do this?
Do you set up xml files for each page's content something like this:
<?xml version="1.0" encoding="UTF-8"?>
<PAGE>
<title>This is one page</title>
<keywords>testing,test,tested</keywords>
<body><![CDATA[<p>test</p>]]></body>
</PAGE>
So every time page is requested from the server it loads the generic php template page and then pulls in the correct xml file?
How do you deal with pages that maybe have most of the content in body tag coming from the xml file, but maybe you also have some dynamic element that uses a database too?
What are considered to be the best practices?