You are here:  » modifying html template to show Extra Description Fields

Support Forum



modifying html template to show Extra Description Fields

Submitted by mally on Wed, 2007-11-28 14:40 in

Hi all

I have a new feed with an extra field. When I've checked the Extra Description Fields page the new field is called publisher

I know how to add it using filters, i.e add it after the description. %publisher%

However I would like to be able to add the code to a couple of the html template pages..

Can you explain what to put in for example /html/prices.php

<p>Subscription to <?php print $mainProduct["name"]; ?> which is published by ***************</p>

thanks

Submitted by support on Wed, 2007-11-28 15:06

Hi Mal,

When you add extra fields in the way described the text is only added to the existing description and is not available in the database as a standalone field. In order to do this, you would need to modify the admin / import scripts and your database to add "publisher" as an imported field on your site. The instructions for doing this are in the following thread:

http://www.pricetapestry.com/node/313

After incorporating the new field, the code you would use within html/prices.php would be:

<p>Subscription to <?php print $mainProduct["name"]; ?> which is published by <?php print $mainProduct["publisher"]; ?></p>

(assuming that the field you add is called "publisher")

Hope this helps,
Cheers,
David.

Submitted by mally on Wed, 2007-11-28 15:22

theres no difference between them both ?

Submitted by support on Wed, 2007-11-28 15:38

Ooops - sorry - it should have been "publisher" not "name"! I've corrected it above...

Cheers,
David.