How to add custom fields into JReviews RSS Feeds

From JReviews Documentation
Revision as of 09:19, 8 November 2011 by Jreviews (Talk | contribs) (Created page with "== Customizing the Listing RSS Feed == To add a custom field into Listing RSS feed, edit this file: *<span style="color: blue">/com_jreviews/jreviews/views/themes/default/feeds/...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Customizing the Listing RSS Feed

To add a custom field into Listing RSS feed, edit this file:

  • /com_jreviews/jreviews/views/themes/default/feeds/listings.rss2.thtml


Find the description tag:

<description>
<![CDATA[
<?php if($this->Config->rss_item_images && !empty($listing['Listing']['images'])):?>
<?php echo $Thumbnail->thumb($listing, 0, array('tn_mode'=>$this->Config->list_thumb_mode,'location'=>'list','dimensions'=>array($this->Config->list_image_resize),'align'=>$this->Config->rss_item_image_align));?>
<?php endif;?>
<?php echo $Text->truncateWords($listing['Listing']['summary'],$this->Config->list_abstract_trim);?>
]]>
</description>


and paste the field output code inside it (i.e. below summary code).

The code for custom fields that you can use is:

Outputs the field label

<?php echo $CustomFields->label('jr_fieldname',$listing); ?>

Outputs the field value

<?php echo $CustomFields->field('jr_fieldname',$listing); ?>


More info is available in How to customize the layout of custom fields in Theme files.


After you make modifications to the rss theme file, to see the changes you need to first delete the cached rss feed xml file in this folder:

  • {joomla_root}/cache