Exemple #1
0
<div class="relative list-items">
	<ul>
		<?php 
foreach ($list as $item) {
    $img = @getimagesize(JPATH_ROOT . DS . $item->images);
    $w = 100;
    $frameHeight = 70;
    $h = 0;
    if (!empty($img)) {
        $h = round($img[1] * $w / $img[0]);
    }
    if ($h < $frameHeight) {
        $margin = round(($frameHeight - $h) / 2);
    }
    $item->slug = $item->id . ':' . $item->alias;
    $link = JRoute::_(Jnt_HanhphucHelperRoute::getAlbumRoute($item->slug));
    ?>
		<li>
			<div>
				<a href="<?php 
    echo $link;
    ?>
">
					<img src="<?php 
    echo $item->thumb;
    ?>
" alt="<?php 
    echo $item->name;
    ?>
" style="border: none; width: <?php 
    echo $w . 'px';