You are here:  » Converting an existing .html design into a Price Tapestry theme


Converting an existing .html design into a Price Tapestry theme

Submitted by support on Sat, 2010-10-02 08:24 in

Hi everyone,

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.

Step 1
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

Step 2
View the source of the blank page using your web browser's View > Source menu

Step 3
Select and copy all the HTML up to the marker to the clipboard

Step 4
Create a new file in your text editor called header.php, and paste the HTML from the previous step into it

Step 5
Go back to the view source window, and now copy all the HTML after the marker to the clipboard

Step 6
Create a new file in your text editor called footer.php, and paste the HTML from the previous step into it

Step 7
Finally, remove any <title> and <meta ...> tags from your newly created header.php, and replace with the following code:

<title>
  <?php print(isset($header["title"])?$header["title"]:$config_title); ?>
</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...