I upgrade a site template from Nebulae - version 1.6.3 to the latest version 1.16. Nebulae Template

The new template change the rt-container children class from this:

enter image description here enter image description here

to this:

enter image description here enter image description here

As you can see, the layout reversed because the class changed inside rt-container. I manually changed the grid class on templates/rt_nebulae/html/layouts/body_mainbody.php but it applied to all pages:





defined('JPATH_BASE') or die();


 * @package gantry
 * @subpackage html.layouts
class GantryLayoutBody_MainBody extends GantryLayout {
    var $render_params = array(
        'schema'        =>  null,
        'pushPull'      =>  null,
        'classKey'      =>  null,
        'sidebars'      =>  '',
        'contentTop'    =>  null,
        'contentBottom' =>  null
    function render($params = array()){
        global $gantry;

        $fparams = $this-> _getParams($params);

        // logic to determine if the component should be displayed
        $display_mainbody = !($gantry->get("mainbody-enabled",true)==false && JRequest::getVar('view') == 'featured');
        $display_component = !($gantry->get("component-enabled",true)==false && (JRequest::getVar('option') == 'com_content' && JRequest::getVar('view') == 'featured'));

        $mbClasses = trim("rt-grid-" . trim($fparams->schema['mb'] . " " . $fparams->pushPull[0]));
        $mbClasses = preg_replace('/\s\s+/', ' ', $mbClasses);
<?php if ($display_mainbody) : ?>
<div id="rt-main" class="<?php echo $fparams->classKey; ?>">
    <div class="rt-container">
        <div class="<?php echo $mbClasses; ?>">
            <?php if (isset($fparams->contentTop)) : ?>
            <?php if (controlsDisplay('content-top')): ?><div class="scroller-enabled"><?php endif; ?>
            <div id="rt-content-top">
                <?php echo $fparams->contentTop; ?>
                <div class="clear"></div>
            <?php if (controlsDisplay('content-top')): ?></div><?php endif; ?>
            <?php endif; ?>
            <?php if ($display_component) : ?>
                <?php if ($gantry->get('articlestyle')!='') : ?>
                <div class="<?php echo $gantry->get('articlestyle'); ?>">
                <?php endif; ?>
                    <div class="rt-block">
                        <div id="rt-mainbody">
                            <div class="component-content">
                                <jdoc:include type="component" />
                        <div class="clear"></div>
                <?php if ($gantry->get('articlestyle')!='') : ?>
                <?php endif; ?>
            <?php endif; ?>
            <?php if (isset($fparams->contentBottom)) : ?>
            <?php if (controlsDisplay('content-bottom')): ?><div class="scroller-enabled"><?php endif; ?>
            <div id="rt-content-bottom">
                <?php echo $fparams->contentBottom; ?>
                <div class="clear"></div>
            <?php if (controlsDisplay('content-bottom')): ?></div><?php endif; ?>
            <?php endif; ?>
        <?php echo $fparams->sidebars; ?>
        <div class="clear"></div>
<?php endif; ?>
        return ob_get_clean();

I want only to modify the CSS grid class on http://test.local/services/programming-services page. How should we do this in Joomla 3.10.12? I'm a complete newbie to Joomla and couldn't find much info on Nebulae's docs.

1 Answer 1


The Rocket Theme Nebulae theme is based on the Gantry 4 framework. That means that you will be able to find the information you are looking for in the Gantry 4 documentation. I has been a while since I worked with this template, but as far as I can remember you can create an override of the layout and configure the positioning.

If that is not possible, take a look at this page in the Gantry 4 documentation. It describes how you can override the file body_mainbody.php and add your own classes to the HTML.

NB: Joomla! 3 has reached end-of-life status on 17 August 2023, so you might want to think about upgrading to at least Joomla! 4 to keep your website stable and safe.

  • Thanks, I was able to specifically modify the page css with the help of this https://joomla.stackexchange.com/a/5400/17539
    – lance2k
    Commented Jan 10 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.