- Posts: 13
COMMUNITY FORUM
How to hide K2 item on the front page
- Zdenek
-
Topic Author
- Offline
- New Member
Less
More
8 years 8 months ago #157225
by Zdenek
How to hide K2 item on the front page was created by Zdenek
Hello,
I would like to hide K2 item on the front page, because I want to set up front page from the modules only and I dont want to have a empty article div in the source.
I use Joomla blank template: github.com/Bloggerschmidt/Blank
Thanks for help.
I would like to hide K2 item on the front page, because I want to set up front page from the modules only and I dont want to have a empty article div in the source.
I use Joomla blank template: github.com/Bloggerschmidt/Blank
Thanks for help.
Please Log in or Create an account to join the conversation.
- Zdenek
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 13
8 years 8 months ago #157226
by Zdenek
Replied by Zdenek on topic How to hide K2 item on the front page
I found the solution:
<?php // Hides the article for home page made out of the modules only
$menu = &JSite::getMenu();
if ($menu->getActive() != $menu->getDefault()) {
?>
<jdoc:include type="component" />
<?php } ?>
<?php // Hides the article for home page made out of the modules only
$menu = &JSite::getMenu();
if ($menu->getActive() != $menu->getDefault()) {
?>
<jdoc:include type="component" />
<?php } ?>
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 8 months ago #157239
by Krikor Boghossian
Replied by Krikor Boghossian on topic How to hide K2 item on the front page
This will hide the entire component area in the frontpage.
You can publish a module instead of the component in order to display custom content.
You can publish a module instead of the component in order to display custom content.
Please Log in or Create an account to join the conversation.
- Zdenek
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 13
8 years 8 months ago #157259
by Zdenek
Replied by Zdenek on topic How to hide K2 item on the front page
Yes, that is the solution too, but in this project, i want to hide component on the home page.
Or you think there could be a prblem with my solution?
Or you think there could be a prblem with my solution?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 8 months ago #157278
by Krikor Boghossian
Replied by Krikor Boghossian on topic How to hide K2 item on the front page
No, no problem at all.
It just a tip in case you needed it :)
It just a tip in case you needed it :)
Please Log in or Create an account to join the conversation.