foreach ($articles as $article) { $images = json_decode($article->images); echo '<div class="col-sm-6 col-md-4 project-item mycat-' . $article->catid . '"> <div class="project-item-inner"> <figure class="alignnone project-img">'; if ($images->image_intro) { echo '<img src="' . JURI::base() . $images->image_intro . '" alt="" />'; } else { echo '<img src="' . JURI::base() . 'templates/' . $app->getTemplate() . '/images/carousel_default.jpg" alt="" />'; } echo '<div class="overlay"> <a href="' . ContentHelperRoute::getArticleRoute($article->id, $article->catid) . '" class="dlink"><i class="fa fa-link"></i></a>'; if ($images->image_fulltext) { echo '<a href="' . JURI::base() . $images->image_fulltext . '" class="popup-link zoom"><i class="fa fa-search-plus"></i></a>'; } echo '</div> </figure> <div class="project-desc"> <h4 class="title"><a href="' . ContentHelperRoute::getArticleRoute($article->id, $article->catid) . '">' . $article->title . '</a></h4> <span class="desc">' . modLastWorksHelper::getCategoryLW($article->catid) . '</span> </div> </div> </div>'; } echo '</div>'; } else { // .A1 echo '<p class="vg-alert">There are no articles for this module.</p>'; } // .A1 --> echo '</div>';
* @copyright Copyright (C) 2013 JoomPla.net. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // no direct access defined('_JEXEC') or die; // Import library to get working JHtml elements (like <img>, <a> tags) jimport('joomla.html.html'); // Load CSS JHtml::stylesheet(Juri::base() . 'modules/mod_lastworks/assets/css/style.css'); // Main container. To add Module class suffix in this container, add the PHP var $moduleclass_sfx echo '<div class="lastworks-container lastworks-one-column">'; if (count($articles)) { foreach ($articles as $article) { //<-- ARTICLE LOOP. $images = json_decode($article->images); $category = modLastWorksHelper::getCategoryLW($article->catid); echo '<div class="lastworks-row row-fluid"> <div class="lastworks-item span12">'; // Title of the article echo '<h3>' . $article->title . '</h3>'; // Category of the article /*echo '<ul class="breadcrumb"> <li>' . JText::_('JCATEGORY') . ': ' . JHtml::_('link', ContentHelperRoute::getCategoryRoute($article->catid), $category) . '</li> </ul>';*/ // Intro image of the article. display image only when exist in the Article >> Images & Links >> Intro Image if ($images->image_intro) { echo JHtml::_('image', Juri::base() . $images->image_intro, 'alt="' . $article->title . '"'); } // Intro Text of the article echo $article->introtext; // Read more link
/** * @autor Valentín García * @website www.htmgarcia.com * @package Joomla.Site * @subpackage mod_lastworks * @copyright Copyright (C) 2013 Valentín García. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ // no direct access defined('_JEXEC') or die; include_once JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_content' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'route.php'; // Include the syndicate functions only once include_once dirname(__FILE__) . '/helper.php'; //vars $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx')); //suffix $id_ = $module->id; //Moduleid $categories = $params->get('vgcategories'); $filter = $params->get('vgfilter', 'any'); $orderingtype = $params->get('vgorderingtype', 'created'); $ordering = $params->get('vgordering', 'ASC'); $limit = $params->get('vgnumarticles', 6); $layout = $params->get('vglayout', 'default'); //data $articles = modLastWorksHelper::getArticlesLW($categories, $filter, $orderingtype, $ordering, $limit); if ($categories) { $categories = modLastWorksHelper::getCategoriesLW($categories); } require JModuleHelper::getLayoutPath('mod_lastworks', $layout);