Example #1
0
 public function elementShortcode($atts = null, $content = null)
 {
     extract(JSNTplMMHelperShortcode::shortcodeAtts(array('span' => 'span6', 'style' => ''), $atts));
     $span = intval(substr($span, 4));
     //$class   = "col-md-$span col-sm-$span col-xs-12";
     //$spanSmall	= intval($span * 3 / 2);
     $class = "col-md-{$span} col-sm-{$span}";
     $content = empty($content) ? JSNTplMMHelperShortcode::removeAutop($content) : JSNTplMMHelperShortcode::doShortcodeFrontend($content);
     $html = '';
     $html .= '<div class="jsn-tpl-mm-column-element ' . $class . '">' . $content . '</div>';
     return $html;
 }
Example #2
0
 public function elementShortcode($atts = null, $content = null)
 {
     $html = '';
     $arrParams = JSNTplMMHelperShortcode::shortcodeAtts($this->config['params'], $atts);
     extract($arrParams);
     $html .= '<div class="jsn-tpl-mm-module-element jsn-tpl-mm-module-element-container ' . $css_suffix . '" id="' . $id_wrapper . '">';
     if ((string) $module_id == '' || (int) $module_id <= 0) {
         $html .= '<div class="alert alert-block">' . JText::_('JSN_TPLFW_MEGAMENU_ELEMENT_MODULE_NO_MODULE_SELECTED', true) . '</div>';
     } else {
         $moduleID = (int) $module_id;
         $html .= $this->loadModule($moduleID, $show_module_title);
     }
     $html .= '</div>';
     return $html;
 }
Example #3
0
 public function elementShortcode($atts = null, $content = null)
 {
     $templateParameters = $this->getTemplateParams();
     $arrParams = JSNTplMMHelperShortcode::shortcodeAtts($this->config['params'], $atts);
     extract($arrParams);
     $html = '<div class="jsn-tpl-megamenu-submenu-container jsn_tpl_mm_menu_element">';
     $items = self::getList($templateParameters, $parent_id);
     $html .= self::beginMenu();
     if (count($items)) {
         $html .= self::middleMenu($items, $parent_id);
     } else {
         $html .= '<li><div class="alert alert-block">' . JText::_('JSN_TPLFW_MEGAMENU_ELEMENT_SUBMENU_NO_SUBMENU', true) . '</div></li>';
     }
     $html .= self::endMenu();
     $html .= '</div>';
     return $html;
 }
Example #4
0
 public function elementShortcode($atts = null, $content = null)
 {
     $arrParams = JSNTplMMHelperShortcode::shortcodeAtts($this->config['params'], $atts);
     extract($arrParams);
     $html = '';
     $html .= '<div class="jsn-tpl-mm-module-position-element jsn-tpl-mm-module-position-container ' . $css_suffix . '" id="' . $id_wrapper . '">';
     if (trim((string) $position_id) == '') {
         $html .= '<div class="alert alert-block">' . JText::_('JSN_TPLFW_MEGAMENU_ELEMENT_MODULE_POSITION_NO_POSITION_SELECTED', true) . '</div>';
     } else {
         $position = trim((string) $position_id);
         $modules = $this->getModules($position);
         if (!count($modules)) {
             $html .= '<div class="alert alert-block">' . JText::_('JSN_TPLFW_MEGAMENU_ELEMENT_MODULE_POSITION_NO_POSITION_SELECTED', true) . '</div>';
         }
         $html .= $this->renderModule($modules, $show_module_title);
     }
     $html .= '</div>';
     return $html;
 }