Converting an existing .html design into a Price Tapestry theme
Just posting a "how to" regarding conversion of an existing HTML design into a suitable html/header.php and html/footer.php in order to blend Price Tapestry with the design of an existing site.
Create an HTML page for your theme, with a marker such as HERE at the position at which you wish the Price Tapestry generated content to appear
View the source of the blank page using your web browser's View > Source menu
Select and copy all the HTML up to the marker to the clipboard
Create a new file in your text editor called header.php, and paste the HTML from the previous step into it
Go back to the view source window, and now copy all the HTML after the marker to the clipboard
Create a new file in your text editor called footer.php, and paste the HTML from the previous step into it
Finally, remove any
<meta ...> tags from your newly created header.php, and replace with the following code:
<?php print(isset($header["title"])?$header["title"]:$config_title); ?>
<?php if (isset($header["meta"])): foreach($header["meta"] as $name => $content): ?>
<meta name='<?php print $name; ?>' content='<?php print $content; ?>' />
<?php endforeach; endif; ?>
You will then have created your html/header.php and html/footer.php for your custom theme that you can upload to your Price Tapestry installation. There is one caveat; and that is to make sure that any resources, e.g. .css or image files referenced by the HTML in your header and footer contain fully qualified paths, i.e. they begin with "/", for example /images/logo.gif. This will make sure that they are found correctly if you are using Price Tapestry's clean URLs feature by enabling $config_useRewrite and creating a .htaccess file...