test
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • mustards Friend
    #183262

    I’ve used many Joomlart templates and happily customized them using information on this forum. However I’m using LESS for the first time with Brisk and I’m not clear on what I need to do differently.

    I need to hide the main content area on the home page but show it on the rest of the pages. By default Brisk has main content turned off so I turned this on by changing the layout from “home” to “default”.

    Next I tried to add my usual override to hide the main content. I added the following to the file core.less:

    .nomain body {
    display: none;
    }

    Then in my menu item for the home page I set the page suffix to:

    nomain (with a leading space)

    I then conpiled LESS to CSS in the template manager. This was completed successfully.

    This does not hide the main body on the home page.

    Also I noticed that the css files don’t seem to change (although I don’t know if they are supposed to, and which ones).

    I’ve tried this with debug mode on and off and with enable compress CSS on and off.

    I assume I’ve missed something due to the LESS functionality. Can you help please?

    Thanks!

    griiettner Friend
    #476810

    Do you have any specific reason to do this using CSS, instead of hiding by using Joomla API?

    In case you think is best by doing using Joomla API, you ca do by, going to

    templatesja_brisktplsblocksmainbody.php at lines 62 to 67 and substitute the whole thing by

    [PHP]
    <!– MAIN CONTENT –>
    <div id=”ja-content” class=”ja-content <?php echo $this->getClass($layout, $col) ?>”
    <?php echo $this->getData ($layout, $col++) ?>>
    <jdoc:include type=”message” />
    <?php
    $menu = &JSite::getMenu();
    if ($menu->getActive() != $menu->getDefault()) { ?>
    <jdoc:include type=”component” />
    <?php } ?>
    </div>
    <!– //MAIN CONTENT –>
    [/PHP]

    This will naively hide the main content from home page only

    mustards Friend
    #476812

    Thanks. I’ve always done this by CSS just because it seems less invasive to me than changing php code.

    I tried your suggestion but it doesn’t do what I was hoping for. Instead of removing the space entirely it leaves the space there but it is empty. My CSS example works like this with regular sites that don’t use LESS.

    What I was hoping for was the equivalent of when I set the layout to “home” in the template manager. You can see the two results in these screen shots.


    1. with-main-body-removed-using-php
    2. with-main-body-removed-using-template
    griiettner Friend
    #476833

    Just move the conditional (if) code to before the div`s you want to remove from your code…

    mustards Friend
    #476837

    Thanks! I’ll bear that in mind next time. I’ve become too frustrated with the Brisk template and the LESS configuration so I’ve decided to use another Joomlart template which just uses regular CSS only. I couldn’t work out how to change anything in Brisk and I found that things (like the menu font) would change for no obvious reason. I guess I’ll have to work with LESS at some point but hopefully by then it will be more obvious how to use it.

    Thanks very much for your help anyway. Much appreciated.

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  mustards 12 years ago.

We moved to new unified forum. Please post all new support queries in our New Forum