Skip to content

Commit

Permalink
adding enclosure
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidpeywasti committed Dec 21, 2014
1 parent 659bf03 commit bf3177c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/ModuleCatalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ protected function parseProduct($objProduct, $blnAddCategory=false, $strClass=''
}
}

$objTemplate->enclosure = array();

// Add enclosures
if ($objProduct->addEnclosure)
{
$this->addEnclosuresToTemplate($objTemplate, $objProduct->row());
}

return $objTemplate->parse();
}

Expand Down
8 changes: 8 additions & 0 deletions templates/product/product_full.html5
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,12 @@
</div>
<?php } ?>

<?php if ($this->enclosure): ?>
<div class="enclosure">
<?php foreach ($this->enclosure as $enclosure): ?>
<p><img src="<?php echo $enclosure['icon']; ?>" width="18" height="18" alt="<?php echo $enclosure['mime']; ?>" class="mime_icon"> <a href="<?php echo $enclosure['href']; ?>" title="<?php echo $enclosure['title']; ?>"><?php echo $enclosure['link']; ?> <span class="size">(<?php echo $enclosure['filesize']; ?>)</span></a></p>
<?php endforeach; ?>
</div>
<?php endif; ?>

</div>
8 changes: 8 additions & 0 deletions templates/product/product_full.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,12 @@
</div>
<?php } ?>

<?php if ($this->enclosure): ?>
<div class="enclosure">
<?php foreach ($this->enclosure as $enclosure): ?>
<p><img src="<?php echo $enclosure['icon']; ?>" width="18" height="18" alt="<?php echo $enclosure['mime']; ?>" class="mime_icon"> <a href="<?php echo $enclosure['href']; ?>" title="<?php echo $enclosure['title']; ?>"><?php echo $enclosure['link']; ?> <span class="size">(<?php echo $enclosure['filesize']; ?>)</span></a></p>
<?php endforeach; ?>
</div>
<?php endif; ?>

</div>

0 comments on commit bf3177c

Please sign in to comment.