-
AuthorPosts
-
December 19, 2012 at 3:36 pm #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 Friendgriiettner
- Join date:
- November 2008
- Posts:
- 18
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 2
- Thanked:
- 20 times in 6 posts
December 19, 2012 at 4:35 pm #476810Do 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
December 19, 2012 at 4:53 pm #476812Thanks. 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.
-
griiettner Friend
griiettner
- Join date:
- November 2008
- Posts:
- 18
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 2
- Thanked:
- 20 times in 6 posts
December 19, 2012 at 11:47 pm #476833Just move the conditional (if) code to before the div`s you want to remove from your code…
December 20, 2012 at 12:52 am #476837Thanks! 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.
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)This topic contains 5 replies, has 2 voices, and was last updated by mustards 11 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum