public function renders() { ob_start(); $path = CANVASPath::getPath('tpls/widgets/' . $this->name . '.php'); if ($path) { include $path; } else { ?> <div class="canvas-back-to-top"> <!-- BACK TOP TOP BUTTON --> <div id="back-to-top" data-spy="affix" data-offset-top="300" class="back-to-top hidden-xs hidden-sm affix-top"> <button class="btn btn-primary" title="Back to Top"><i class="fa fa-caret-up"></i></button> </div> <script type="text/javascript"> (function($) {
public function renders() { ob_start(); $path = CANVASPath::getPath('tpls/widgets/' . $this->name . '.php'); if ($path) { include $path; } else { ?> <!-- MAIN CONTENT --> <div id="canvas-content" class="canvas-content"> <?php if ($this->hasMessage()) { ?> <jdoc:include type="message" /> <?php } ?> <jdoc:include type="component" /> </div>
public function renders() { $copyrightinfo = (string) $this->getParam('copyrightinfo'); ob_start(); $path = CANVASPath::getPath('tpls/widgets/' . $this->name . '.php'); if ($path) { include $path; } else { ?> <div class="canvas-copyrightinfo"> <span class="copyright"> <?php echo $copyrightinfo ? $copyrightinfo : JText::_('CANVAS_DEFAULT_COPYRIGHT'); ?> </span> </div> <?php } return ob_get_clean(); }
public function renders() { $now = JFactory::getDate('now'); $date_formet = $this->getParam('date_formet', 'd M Y h:i:s'); $date = JHtml::_('date', $now, $date_formet); ob_start(); $path = CANVASPath::getPath('tpls/widgets/' . $this->name . '.php'); if ($path) { include $path; } else { ?> <div id="canvas-date" class="canvas-hide"> <?php echo $date; ?> </div> <?php } return ob_get_clean(); }
public function renders() { ob_start(); $path = CANVASPath::getPath('tpls/widgets/' . $this->name . '.php'); if ($path) { include $path; } else { ?> <div class="poweredby text-hide"> <a class="canvas-logo canvas-logo-color" href="http://themezart.com/canvas-framework" title="<?php echo JText::_('CANVAS_POWER_BY_TEXT'); ?> " target="_blank" <?php echo method_exists('CANVAS', 'isHome') && CANVAS::isHome() ? '' : 'rel="nofollow"'; ?> ><?php echo JText::_('CANVAS_POWER_BY_HTML'); ?> </a> </div> <?php
public function renders() { ob_start(); $fontresizer_selection = $this->getParam('fontresizer_selection', '#canvas-content'); $path = CANVASPath::getPath('tpls/widgets/' . $this->name . '.php'); $this->doc->addScript(CANVAS_URL . '/js/jquery.jfontsize.js'); if ($path) { include $path; } else { ?> <section class="canvas-fontresizer"> <!-- BACK TO TOP --> <div id="font-resizer" class="canvas-hide"> <a class="icon-search-minus" id="canvas-fr-m">A-</a> <a class="icon-search" id="canvas-fr-d">A</a> <a class="icon-search-plus" id="canvas-fr-p">A+</a> </div> <script type="text/javascript"> //<![CDATA[ //jQuery('$selector'); (function($){ $(document).ready(function(){ $('<?php echo $fontresizer_selection; ?> ').jfontsize({ btnMinusClasseId: '#canvas-fr-m', btnDefaultClasseId: '#canvas-fr-d', btnPlusClasseId: '#canvas-fr-p' }); }); })(jQuery); //]]> </script> </section> <?php } return ob_get_clean();
public function renders() { JHtml::_('bootstrap.tooltip'); $CANVASTemplate = new CANVASTemplate(); $path = CANVASPath::getPath('tpls/widgets/' . $this->name . '.php'); ob_start(); if ($path) { include $path; } else { ?> <!-- MAIN NAVIGATION --> <div id="canvas-mainnav" class="wrap navbar navbar-default <?php echo $this->getParam('navigation_fixed_top', '0') ? 'navbar-fixed-top' : ''; ?> canvas-mainnav"> <?php if ($this->getParam('navigation_fixed_top', '0')) { ?> <div class="container"> <?php } ?> <!-- NAVBAR HEADER --> <div class="navbar-header"> <?php if ($this->getParam('load_head_logo_nav', 1)) { // get params $sitename = $this->params->get('sitename'); $slogan = $this->params->get('slogan', ''); $logotype = $this->params->get('logotype', 'text'); $logoimage = $logotype == 'image' ? $this->params->get('logoimage', 'templates/' . CANVAS_TEMPLATE . '/images/logo.png') : ''; $logoimgsm = $logotype == 'image' && $this->params->get('enable_logoimage_sm', 0) ? $this->params->get('logoimage_sm', '') : false; if (!$sitename) { $sitename = JFactory::getConfig()->get('sitename'); } ?> <!-- LOGO IN NAVBAR --> <!-- LOGO --> <div class="logo logo-<?php echo $logotype; ?> "> <div class="logo-<?php echo $logotype, $logoimgsm ? ' logo-control' : ''; ?> "> <a href="<?php echo JURI::base(true); ?> " title="<?php echo strip_tags($sitename); ?> "> <?php if ($logotype == 'image') { ?> <img class="logo-img" src="<?php echo JURI::base(true) . '/' . $logoimage; ?> " alt="<?php echo strip_tags($sitename); ?> " /> <?php } ?> <?php if ($logoimgsm) { ?> <img class="logo-img-sm" src="<?php echo JURI::base(true) . '/' . $logoimgsm; ?> " alt="<?php echo strip_tags($sitename); ?> " /> <?php } ?> <?php if ($logotype == 'image') { echo '<span class="hide-text">'; } ?> <?php if (strpos($sitename, '::') !== false) { $sitenameTitle = explode('::', $sitename); $sitenameTitle = $sitenameTitle[0] . "<span>" . $sitenameTitle[1] . "</span>"; } else { $sitenameTitle = $sitename; } ?> <?php echo $sitenameTitle; ?> <?php if ($logotype == 'image') { echo '</span>'; } ?> </a> <?php echo $slogan ? '<span class="site-slogan">' . $slogan . '</span>' : ''; ?> </div> </div> <!-- //LOGO --> <!-- //LOGO IN NAVBAR --> <?php } ?> <?php if ($this->getParam('load_head_search_nav', 1)) { ?> <!-- HEAD SEARCH --> <div class="head-search <?php $this->_c('head-search'); ?> "> <jdoc:include type="modules" name="<?php $this->_p('head-search'); ?> " style="raw" /> </div> <!-- //HEAD SEARCH --> <?php } ?> <?php if ($this->getParam('load_head_login_nav', 1)) { ?> <!-- HEAD SEARCH --> <div class="head-login <?php $this->_c('login'); ?> "> <!-- login trigger modal --> <?php $user = JFactory::getUser(); $type = !$user->get('guest') ? 'logout' : 'login'; ?> <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#canvasWidget<?php echo $type; ?> "> <i class="fa fa-sign-<?php echo $type == 'login' ? 'in' : 'out'; ?> "></i> </button> <div class="modal fade" id="canvasWidgetlogin" tabindex="-1" role="dialog" aria-labelledby="canvasWidget<?php echo $type; ?> Label" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title" id="canvasWidget<?php echo $type; ?> Label"><?php echo JText::_('JLOGIN'); ?> </h4> </div> <div class="modal-body"> <form class="form-horizontal" role="form" action="<?php echo JRoute::_('index.php', true); ?> " method="post"> <div class="form-group"> <label for="inputUsername" class="col-sm-4 control-label"> <?php echo JText::_('USER_NAME'); ?> <a class="hasTooltip" href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?> " title="<?php echo JText::_('FORGOT_YOUR_USERNAME'); ?> "> <i class="fa fa-question-circle"></i> </a> </label> <div class="col-sm-8"> <input type="text" name="username" class="form-control" id="inputUsername" placeholder="Username"> </div> </div> <div class="form-group"> <label for="inputUserPassword" class="col-sm-4 control-label"><?php echo JText::_('PASSWORD'); ?> <a class="hasTooltip" href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?> " title="<?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?> "> <i class="fa fa-question-circle"></i> </a> </label> <div class="col-sm-8"> <input type="password" class="form-control" id="inputUserPassword" name="password" placeholder="Password"> </div> </div> <?php if (JPluginHelper::isEnabled('system', 'remember')) { ?> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <div class="checkbox"> <label> <input type="checkbox" name="remember" > <?php echo JText::_('REMEMBER_ME'); ?> </label> </div> </div> </div> <?php } ?> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <input type="hidden" name="option" value="com_users" /> <input type="hidden" name="task" value="user.login" /> <input type="hidden" name="return" value="<?php
public function renders() { $twitter = (string) $this->getParam('twitter'); $facebook = (string) $this->getParam('facebook'); $gplus = (string) $this->getParam('gplus'); $rss = (string) $this->getParam('rss'); ob_start(); $path = CANVASPath::getPath('tpls/widgets/' . $this->name . '.php'); if ($path) { include $path; } else { ?> <?php if ($twitter or $facebook or $gplus or $rss) { ?> <div class="canvas-social-icons"> <ul class="social-icons list-inline clearfix"> <?php if (!empty($twitter)) { ?> <li class="twitter"> <a href="https://twitter.com/<?php echo $twitter; ?> " rel="author" target="_blank"> <i class="icon-twitter"></i> </a> </li> <?php } ?> <?php if (!empty($facebook)) { ?> <li class="facebook"> <a href="https://facebook.com/<?php echo $facebook; ?> " rel="author" target="_blank"> <i class="icon-facebook"></i> </a> </li> <?php } ?> <?php if (!empty($gplus)) { ?> <li class="gplus"> <a href="https://plus.google.com/<?php echo $gplus; ?> " rel="author" target="_blank"> <i class="icon-google-plus" ></i> </a> </li> <?php } ?> <?php if (!empty($rss)) { ?> <li class="rss"> <a href="<?php echo $rss; ?> " target="_blank"> <i class="icon-rss" ></i> </a> </li> <?php } ?> </ul> </div> <?php } } return ob_get_clean(); }
/** * function loadParam * load and re-render parameters * * @return render success or not */ function renderAdmin() { $frwXml = CANVAS_ADMIN_PATH . '/' . CANVAS_ADMIN . '.xml'; $tplXml = CANVAS_TEMPLATE_PATH . '/templateDetails.xml'; $cusXml = CANVASPath::getPath('etc/assets.xml'); $jtpl = CANVAS_ADMIN_PATH . '/admin/tpls/default.php'; if (file_exists($tplXml) && file_exists($jtpl)) { CANVAS::import('depend/canvasform'); //get the current joomla default instance $form = JForm::getInstance('com_templates.style', 'style', array('control' => 'jform', 'load_data' => true)); //wrap $form = new CANVASForm($form); //remove all fields from group 'params' and reload them again in right other base on template.xml $form->removeGroup('params'); //load the template $form->loadFile(CANVAS_PATH . '/params/template.xml'); //overwrite / extend with params of template $form->loadFile($tplXml, true, '//config'); //overwrite / extend with custom config in custom/etc/assets.xml if ($cusXml && file_exists($cusXml)) { $form->loadFile($cusXml, true, '//config'); } // extend parameters CANVASBot::prepareForm($form); $xml = JFactory::getXML($tplXml); $fxml = JFactory::getXML($frwXml); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('id, title')->from('#__template_styles')->where('template=' . $db->quote(CANVAS_TEMPLATE)); $db->setQuery($query); $styles = $db->loadObjectList(); foreach ($styles as $key => &$style) { $style->title = ucwords(str_replace('_', ' ', $style->title)); } $session = JFactory::getSession(); $canvaslock = $session->get('CANVAS.canvaslock', 'overview_params'); $session->set('CANVAS.canvaslock', null); $input = JFactory::getApplication()->input; include $jtpl; /* //search for global parameters $japp = JFactory::getApplication(); $pglobals = array(); foreach($form->getGroup('params') as $param){ if($form->getFieldAttribute($param->fieldname, 'global', 0, 'params')){ $pglobals[] = array('name' => $param->fieldname, 'value' => $form->getValue($param->fieldname, 'params')); } } $japp->setUserState('oparams', $pglobals); */ return true; } return false; }
/** * Return the pagination footer. * * @return string Pagination footer. * * @since 11.1 */ public function getListFooter() { $app = JFactory::getApplication(); $list = array(); $list['prefix'] = $this->prefix; $list['limit'] = $this->limit; $list['limitstart'] = $this->limitstart; $list['total'] = $this->total; $list['limitfield'] = $this->getLimitBox(); $list['pagescounter'] = $this->getPagesCounter(); $list['pageslinks'] = $this->getPagesLinks(); // CANVAS: detect if chrome pagination.php in template or in plugin $chromePath = CANVASPath::getPath('html/pagination.php'); // $chromePath = JPATH_THEMES . '/' . $app->getTemplate() . '/html/pagination.php'; if (file_exists($chromePath)) { include_once $chromePath; if (function_exists('pagination_list_footer')) { return pagination_list_footer($list); } } return $this->_list_footer($list); }
/** * Load block layout * * @param string &layout Block name - the real block is tpls/[layout].php * * @return null */ function loadLayout($layout) { $path = CANVASPath::getPath('tpls/' . $layout . '.php', 'tpls/default.php'); JDispatcher::getInstance()->trigger('onCANVASLoadLayout', array(&$path, $layout)); if (is_file($path)) { ob_start(); include $path; $buffer = ob_get_contents(); ob_end_clean(); if ($this->responcls && !$this->getParam('responsive', 1)) { //replace $buffer = preg_replace_callback('@class\\s?=\\s?(\'|")(([^\'"]*)(' . implode('|', $this->prefixes) . ')+([^\'"]*))(\'|")@m', array($this, 'responCls'), $buffer); } // check if exist megamenu renderer, place megamenurender on the top to render megamenu before render head if (preg_match_all('/(<jdoc:include type="megamenu"[^>]*>)/i', $buffer, $match)) { foreach ($match[1] as $m) { $buffer = str_replace('type="megamenu"', 'type="megamenurender"', $m) . $buffer; CANVAS::import('renderer/megamenurender'); } } //output echo $buffer; } else { echo "<div class=\"error\">Layout [{$layout}] or [Default] not found!</div>"; } }
public static function copy() { // Initialize some variables $input = JFactory::getApplication()->input; $template = $input->getCmd('template'); $original = $input->getCmd('original'); $layout = $input->getCmd('layout'); //safe name $layout = JApplication::stringURLSafe($layout); if (!$template || !$original || !$layout) { return self::error(JText::_('CANVAS_LAYOUT_INVALID_DATA_TO_SAVE')); } // clone to CUSTOM dir $source = CANVASPath::getPath('tpls/' . $original . '.php'); $dest = CANVASPath::getLocalPath('tpls/' . $layout . '.php'); $confsource = CANVASPath::getPath('etc/layout/' . $layout . '.ini'); $confdest = CANVASPath::getLocalPath('etc/layout/' . $layout . '.ini'); $params = new JRegistry(); $params->loadObject($_POST); $data = $params->toString('INI'); if (!is_dir(dirname($confdest))) { JFolder::create(dirname($confdest)); } if (!is_dir(dirname($dest))) { JFolder::create(dirname($dest)); } if ($data && !@JFile::write($confdest, $data)) { return self::error(JText::_('CANVAS_LAYOUT_OPERATION_FAILED')); } // Check if original file exists if (JFile::exists($source)) { // Check if the desired file already exists if (!JFile::exists($dest)) { if (!JFile::copy($source, $dest)) { return self::error(JText::_('CANVAS_LAYOUT_OPERATION_FAILED')); } //clone configuration file, we only copy if the target file does not exist if (!JFile::exists($confdest) && JFile::exists($confsource)) { JFile::copy($confsource, $confdest); } } else { return self::error(JText::_('CANVAS_LAYOUT_EXISTED')); } } else { return self::error(JText::_('CANVAS_LAYOUT_NOT_FOUND')); } return self::response(array('successful' => JText::_('CANVAS_LAYOUT_SAVE_SUCCESSFULLY'), 'original' => $original, 'layout' => $layout, 'type' => 'clone')); }
public function renders() { ob_start(); $path = CANVASPath::getPath('tpls/widgets/' . $this->name . '.php'); if ($path) { include $path; } else { ?> <!-- LOGIN --> <!-- login trigger modal --> <?php $user = JFactory::getUser(); $type = !$user->get('guest') ? 'logout' : 'login'; ?> <div class="canvas-widget login-widget"> <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#canvasWidget<?php echo $type; ?> "> <i class="fa fa-sign-<?php echo $type == 'login' ? 'in' : 'out'; ?> "></i> </button> <div class="modal fade" id="canvasWidgetlogin" tabindex="-1" role="dialog" aria-labelledby="canvasWidget<?php echo $type; ?> Label" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title" id="canvasWidget<?php echo $type; ?> Label"><?php echo JText::_('JLOGIN'); ?> </h4> </div> <div class="modal-body"> <form class="form-horizontal" role="form" action="<?php echo JRoute::_('index.php', true); ?> " method="post"> <div class="form-group"> <label for="inputUsername" class="col-sm-4 control-label"> <?php echo JText::_('USER_NAME'); ?> <a class="hasTooltip" href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?> " title="<?php echo JText::_('FORGOT_YOUR_USERNAME'); ?> "> <i class="fa fa-question-circle"></i> </a> </label> <div class="col-sm-8"> <input type="text" name="username" class="form-control" id="inputUsername" placeholder="Username"> </div> </div> <div class="form-group"> <label for="inputUserPassword" class="col-sm-4 control-label"><?php echo JText::_('PASSWORD'); ?> <a class="hasTooltip" href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?> " title="<?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?> "> <i class="fa fa-question-circle"></i> </a> </label> <div class="col-sm-8"> <input type="password" class="form-control" id="inputUserPassword" name="password" placeholder="Password"> </div> </div> <?php if (JPluginHelper::isEnabled('system', 'remember')) { ?> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <div class="checkbox"> <label> <input type="checkbox" name="remember" > <?php echo JText::_('REMEMBER_ME'); ?> </label> </div> </div> </div> <?php } ?> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <input type="hidden" name="option" value="com_users" /> <input type="hidden" name="task" value="user.login" /> <input type="hidden" name="return" value="<?php echo base64_encode(JRoute::_('index.php', true)); ?> " /> <?php echo JHtml::_('form.token'); ?> <button type="submit" class="btn btn-default"><?php echo JText::_('JLOGIN'); ?> </button> <?php require_once JPATH_SITE . '/components/com_users/helpers/route.php'; $usersConfig = JComponentHelper::getParams('com_users'); if ($usersConfig->get('allowUserRegistration')) { ?> <a class="btn btn-default" href="<?php echo JRoute::_('index.php?option=com_users&view=registration&Itemid=' . UsersHelperRoute::getRegistrationRoute()); ?> "> <?php echo JText::_('JREGISTER'); ?> <span class="fa fa-arrow-right"></span></a> <?php } ?> </div> </div> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo JText::_('JCLOSE'); ?> </button> </div> </div> </div> </div> <div class="modal fade" id="canvasWidgetlogout" tabindex="-1" role="dialog" aria-labelledby="canvasWidget<?php echo $type; ?> Label" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title" id="canvasWidget<?php echo $type; ?> Label"><?php echo JText::_('JLOGOUT'); ?> </h4> </div> <div class="modal-body"> <form class="form-horizontal" role="form" action="<?php echo JRoute::_('index.php?option=com_users', true); ?> " method="post"> <div class="form-group"> <div class="col-md-12 logout-button"> <button type="submit" class="btn btn-default"><?php echo JText::_('JLOGOUT'); ?> </button> <input type="hidden" name="option" value="com_users"> <input type="hidden" name="task" value="user.logout"> <input type="hidden" name="return" value="<?php echo base64_encode(JRoute::_('index.php', true)); ?> " /> <?php echo JHtml::_('form.token'); ?> </div> </div> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo JText::_('JCLOSE'); ?> </button> </div> </div> </div> </div> </div> <!-- //LOGIN --> <?php } return ob_get_clean(); }
/** * Implement event onGetLayoutPath to return the layout which override by CANVAS & CANVAS templates * This event is fired by overriding ModuleHelper class * Return path to layout if found, false if not * * @param string $module The name of the module * @param string $layout The name of the module layout. If alternative * layout, in the form template:filename. * * @return null */ function onGetLayoutPath($module, $layout) { // Detect layout path in CANVAS themes if (defined('CANVAS_PLUGIN') && CANVAS::detect()) { CANVAS::import('core/path'); $tPath = CANVASPath::getPath('html/' . $module . '/' . $layout . '.php'); if ($tPath) { return $tPath; } } return false; }
public function renders() { // get params $sitename = $this->params->get('sitename'); $slogan = $this->params->get('slogan', ''); $logotype = $this->params->get('logotype', 'text'); $logoimage = $logotype == 'image' ? $this->params->get('logoimage', 'templates/' . CANVAS_TEMPLATE . '/images/logo.png') : ''; $logoimgsm = $logotype == 'image' && $this->params->get('enable_logoimage_sm', 0) ? $this->params->get('logoimage_sm', '') : false; if (!$sitename) { $sitename = JFactory::getConfig()->get('sitename'); } ob_start(); $path = CANVASPath::getPath('tpls/widgets/' . $this->name . '.php'); if ($path) { include $path; } else { ?> <!-- LOGO --> <div class="logo logo-<?php echo $logotype; ?> "> <div class="logo-<?php echo $logotype, $logoimgsm ? ' logo-control' : ''; ?> "> <a href="<?php echo JURI::base(true); ?> " title="<?php echo strip_tags($sitename); ?> "> <?php if ($logotype == 'image') { ?> <img class="logo-img" src="<?php echo JURI::base(true) . '/' . $logoimage; ?> " alt="<?php echo strip_tags($sitename); ?> " /> <?php } ?> <?php if ($logoimgsm) { ?> <img class="logo-img-sm" src="<?php echo JURI::base(true) . '/' . $logoimgsm; ?> " alt="<?php echo strip_tags($sitename); ?> " /> <?php } ?> <?php if ($logotype == 'image') { echo '<span class="hide-text">'; } ?> <?php if (strpos($sitename, '::') !== false) { $sitenameTitle = explode('::', $sitename); $sitenameTitle = $sitenameTitle[0] . "<span>" . $sitenameTitle[1] . "</span>"; } else { $sitenameTitle = $sitename; } ?> <?php echo $sitenameTitle; ?> <?php if ($logotype == 'image') { echo '</span>'; } ?> </a> </div> </div> <!-- //LOGO --> <?php } return ob_get_clean(); }
/** * Load block content * * @param $block string block name - the real block is tpls/blocks/[blockname].php * @param $vars array information of block (used in template layout) * * @return string Block content */ function loadBlock($block, $vars = array()) { if (!$this->_block) { $this->_block = $block; } $path = CANVASPath::getPath('tpls/system/' . $block . '.php'); if (!$path) { $path = CANVASPath::getPath('tpls/blocks/' . $block . '.php'); } ob_start(); if ($path) { include $path; } else { echo "<div class=\"error\">Block [{$block}] not found!</div>"; } $content = ob_get_contents(); ob_end_clean(); if (isset($vars['spl'])) { $content = preg_replace('#(<[A-Za-z]+[^>^\\/]*)>#', '\\1 data-original="' . $block . '"' . (isset($vars['spl']) ? ' data-spotlight="' . $vars['name'] . '"' : '') . '>', $content, 1); $this->_block = null; } echo isset($vars['spl']) ? $content : '<div class="canvas-admin-layout-section"><h5 class="canvas-block-title">' . ucfirst($block) . '</h5>' . $content . '</div>'; }