Permalink
Browse files

Do not display related section if $list is empty

  • Loading branch information...
1 parent c6c4df7 commit a4ab5a089067448b09ee8f13c1026e89e3653651 @rbtylee rbtylee committed Apr 17, 2012
Showing with 9 additions and 6 deletions.
  1. +9 −6 app/views/software/show_desc.ctp
@@ -101,17 +101,20 @@ echo $data[0]['Software']['md5'];
?>
</div>
-<h2 class="sectionedit4"><a>Related / Similar Applications</a></h2>
-<div class="level2">
-<p>
<?PHP
foreach($list as $var)
@rbtylee

rbtylee Apr 18, 2012

Owner

I messed up the order on this somehow.

{
- echo $html->link(str_replace("_"," ",$var), array('controller' => 'software','action' => 'showDesc',$var))."<br/>";
+ if (!empty($list))
+ {
+ echo "<h2 class=\"sectionedit4\"><a>Related / Similar Applications</a></h2>";
+ echo "<div class=\"level2\">";
+ echo "<p>";
+ echo $html->link(str_replace("_"," ",$var), array('controller' => 'software','action' => 'showDesc',$var))."<br/>";
+ echo "</p>";
+ echo "</div>";
+ }
}
?>
-</p>
-</div>
<h2 class="sectionedit5"><a>Software Homepage</a></h2>
<div class="level2">

0 comments on commit a4ab5a0

Please sign in to comment.