0
Welcome Guest! Login
0 items Join Now

how to add a class on "displayMainbody"

    • Underdown's Avatar
    • Underdown
    • Sr. Rocketeer
    • Posts: 159
    • Thanks: 0

    how to add a class on "displayMainbody"

    Posted 8 years 8 months ago
    • hello,

      I have my homepage maded by modules, so no article are present on the home page.
      The reason is because the welcome message is inside an html module in order to be able to customize the appearance of the module using the class suffix.

      But I have a problem whit the open graph, since there are no articles, I can't show description and pictures if shared on social media.

      So if I use an article the appearance of the article background will be different.
      I would like to add a class on component block wich appear only if the visitor is on the home page, so I link the home page to that article, and have the same background.
      But it must be available only on the home page.

      to make it easier I have to customize this line on index.php:
      <?php /** Begin Main Body **/ ?>
      			    	<?php echo $gantry->displayMainbody('mainbody','sidebar','standard','standard','standard','standard','standard'); ?>
      				<?php /** End Main Body **/ ?>

      can you please tell me how i can modify in order to reach this result:


      <div class="rt-block component-block main-overlay-light MYCLASS">

      Thank you
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: how to add a class on "displayMainbody"

    Posted 8 years 8 months ago
    • why don't just use a page class on the body and write some css like

      .mypageclass .component-block { some css }

      (the page suffix feature must be enabled to make this work)
    • Underdown's Avatar
    • Underdown
    • Sr. Rocketeer
    • Posts: 159
    • Thanks: 0

    Re: how to add a class on "displayMainbody"

    Posted 8 years 8 months ago
    • Thank you for your reply.

      I already tried that, it was the main Idea, but i'm using the metropolis template and the page suffix is "inside" component block that has a margin, have a look to the screenshot attached.

      This image is hidden for guests.
      Please log in or register to see it.
    • Last Edit: 8 years 8 months ago by Underdown.
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: how to add a class on "displayMainbody"

    Posted 8 years 8 months ago
    • do you have a link to check?
    • Last Edit: 8 years 8 months ago by Henning.
    • Underdown's Avatar
    • Underdown
    • Sr. Rocketeer
    • Posts: 159
    • Thanks: 0

    Re: how to add a class on "displayMainbody"

    Posted 8 years 8 months ago
    • My website is www.australianboard.com ,
      if you need a link to make the test i can create for you and give you the access.
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: how to add a class on "displayMainbody"

    Posted 8 years 8 months ago
    • yup .. we need to see the issue on a site ...

Time to create page: 0.055 seconds