0
Welcome Guest! Login
0 items Join Now

Mainbody is loading inside Feature position

  • Mainbody is loading inside Feature position

    Posted 13 years 5 months ago
    • I installed an extension that enables the loading of a component into a module position (mod_component by JomExperts). I've set that module to display a component in the Feature-b position. I'm experiencing some strange behavior after doing this. The module does appear in the feature-b position, but Gantry insists on first loading the mainbody position inside of feature-b, and then the component contents inside of mainbody: Feature-b > Mainbody > Component. Instead of what is expected: Feature-b > Component
      In the template settings, I have turned off "display component" . It's almost as if a component MUST be loaded into the mainbody position, regardless of the mod_component extension or template settings. I've used Gantry to build several custom templates and have never seen this behavior before... although this is the first time Ive attempted to display a component into a module position.

      You can see what I'm talking about below. Any help is greatly appreciated:
      devcs.greendezine.com/store
    • --
      Scott Greenwald
      San Diego SEO http://greendezine.com
    • bgman's Avatar
    • bgman
    • Jr. Rocketeer
    • Posts: 26
    • Thanks: 0

    Re: Mainbody is loading inside Feature position

    Posted 13 years 5 months ago
    • Hopefully this wasn't time critical for you!
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Mainbody is loading inside Feature position

    Posted 13 years 5 months ago
    • should be noted that the setting "display-component" to "off" has only an effect on the frontpage.
      If you want to change that you have to copy the folder "layouts" from "components/com_gantry/layouts"
      into the folder "html" in your template-folder

      open body_mainbody.php in this new folder

      change
      $display_component = !($gantry->get("component-enabled",true)==false && JRequest::getVar('view') == 'frontpage');
      to
       
      $display_component = !($gantry->get("component-enabled",true)==false);
       

      this will hide the component on every page. To get control over this with "per-menu-item-configuration" find in templateDetails.xml in your template.folder change line 688
      <param name="component-enabled" type="toggle" default="1" label="COMPONENT" description="COMPONENT_DESC"  />
      to
       
      <param name="component-enabled" type="toggle" default="1" label="COMPONENT" description="COMPONENT_DESC" setbyurl="true" setinsession="true" setbysession="true" setincookie="true" setbycookie="true" setinmenuitem="true"/>
       

      (all this is for latest rt_gantry_j15 wit gantry 3.1.4)
  • Re: Mainbody is loading inside Feature position

    Posted 13 years 5 months ago
    • Thank you for this tutorial. I could put this to good use.

      However, in regards to my original issue. I've realized that the Display Component feature is not causing the problem I'm experiencing. Even with it turned off on the home page, using the module "mod_component" to load a component into a module position still insists on loading a mainbody position before the component. So I get something like this:

      rt-mainbottom
      ---rt-mainbody
      component

      Please see the screen shot attached which includes output from Firebug.

      Until I can fix this, I've had to resort to hard-coding the component html into an article item to give the illusion that the component is appearing on my home page. :cry:
    • --
      Scott Greenwald
      San Diego SEO http://greendezine.com

Time to create page: 0.051 seconds