Difference between revisions of "How do I hide Summary text on listing detail page"

From JReviews Documentation
Jump to: navigation, search
Line 6: Line 6:
 
<source lang="php">
 
<source lang="php">
 
<?php echo nl2br($listing['Listing']['text']);?>
 
<?php echo nl2br($listing['Listing']['text']);?>
 +
<?php echo $listing['Listing']['text'] !== strip_tags($listing['Listing']['text']) ? $listing['Listing']['text'] : nl2br($listing['Listing']['text']);?>
 
</source>
 
</source>
  
Line 11: Line 12:
 
with:
 
with:
 
<source lang="php">
 
<source lang="php">
<?php echo nl2br($listing['Listing']['description']);?>
+
<?php echo $listing['Listing']['description'] !== strip_tags($listing['Listing']['description']) ? $listing['Listing']['description'] : nl2br($listing['Listing']['description']);?>
 
</source>
 
</source>
  

Revision as of 06:26, 13 June 2012

Edit this theme file:

  • \com_jreviews\jreviews\views\themes\{theme_name}\listings\detail.thtml


and replace:

<?php echo nl2br($listing['Listing']['text']);?>
<?php echo $listing['Listing']['text'] !== strip_tags($listing['Listing']['text']) ? $listing['Listing']['text'] : nl2br($listing['Listing']['text']);?>


with:

<?php echo $listing['Listing']['description'] !== strip_tags($listing['Listing']['description']) ? $listing['Listing']['description'] : nl2br($listing['Listing']['description']);?>