Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @package Joomla.Administrator
- * @subpackage Templates.joomla-london
- *
- * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
- * @license GNU General Public License version 2 or later; see LICENSE.txt
- */
- defined('_JEXEC') or die;
- /**
- * This is a file to add template specific chrome to module rendering. To use it you would
- * set the style attribute for the given module(s) include in your template to use the style
- * for each given modChrome function.
- *
- * This gives template designers ultimate control over how modules are rendered.
- *
- * NOTICE: All chrome wrapping methods should be named: modChrome_{STYLE} and take the same
- * two arguments.
- */
- /*
- * Module chrome for rendering the module in a belowBanner
- */
- // make sure you name it correctly. it always starts modChrome and I have named it bootstrap4 as I will be using that framework. I could have called it anything, but I thought this was the most meaningful/descriptive name.
- function modChrome_bootstrap4($module, &$params, &$attribs)
- {
- // if the module has content
- if ($module->content)
- {
- // get Bootstrap size and make sure it is returned as an integer
- $bootstrapSize = (int) $params->get('bootstrap_size');
- // Default empty string for column size
- $cols = '';
- // if the bootstrap class is anything except 0 then insert the class cols- and add the bootstrap size class
- if ($bootstrapSize != '0')
- {
- $cols = ' col-' . $bootstrapSize;
- }
- // If the modules title is set to show... then show it
- if ($module->showtitle)
- {
- echo '<h2>' . $module->title . '</h2>';
- }
- ?>
- <div class="items<?php echo $columnClass; ?>">
- <div class="item">
- <?php echo $module->content; ?>
- </div>
- </div>
- <?php
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment