Keyword

How to hide K2 item on the front page

  • Zdenek
  • Zdenek's Avatar Topic Author
  • Offline
  • New Member
More
7 years 7 months ago #157225 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.

Please Log in or Create an account to join the conversation.

  • Zdenek
  • Zdenek's Avatar Topic Author
  • Offline
  • New Member
More
7 years 7 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 } ?>

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 7 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.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Zdenek
  • Zdenek's Avatar Topic Author
  • Offline
  • New Member
More
7 years 7 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?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 7 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 :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum