Tips & Tricks: hide Home Page in menu

As you know Liferay has a very nice feature that allows you to edit structure of your website by dragging and dropping pages where you want them. You might didn’t notice that beacuse there is a little GUI bug –  mouse cursor doesn’t change when you are over the right area.
Ok, so now you now how to change your sitemap. Now a little trik.

You know that Liferay allows you to select default page for your site. It is obvious that you want to show you Home Page (in example above it’s a “Welcome” page). But when you put on the first place it also be shown in you menu. There are websites when such entry in menu is ok but also there are websites with so many items in menu that editors want to skip that one in favor of something more interesting to their users. I know what you are thinking: “I can always mark that page as hidden”.

WRONG.

Liferay doesn’t allow first page in structure to be hidden. Don’t know why but as default he can just show pages that are not hidden and are Portlet, Panel, Embedded or Web Content type. This bug was mentioned in LPS-8007, LEP-2369 and in comments to other tickets but still it isn’t fixed. For our luck there is a little work around.

If you try to set first page as hidden you will see an error. If you move your page to other position (for example second) you will be able to hide it but as the defualt one Liferay will show new first page in structure. But if you move your deisred page, change it to “hidden”, save your changes and then move it (by drag’n’drop) to first position Liferay won’t show you any error.

Voila! You have your defualt first page and it isn’t showed in menu any more and all this without any hook coding 🙂

Advertisements

12 Responses to Tips & Tricks: hide Home Page in menu

  1. Thanks, I have run in to this also so this is good tip.

    So the why there is validation, as it clearly is not necessary?

  2. Pingback: Confluence: Infrastruktur

  3. ash says:

    I made the Welcome page as the second and then hidden, which worked fine. But, the first page which is displayed now can be accessed only after signing in. Now, i’m not able to get into the signing page, as it says “You do not have permission to view this page. ”

    Please help.

    thanks
    -ash

  4. hienamx says:

    Now move the second page (Welcome Page) using Drag & Drop to the top of your page tree (Configuration->Site Map).

  5. ash says:

    But, to do that I need login to Liferay. How do I login?

    Now, when I click on the “Sign In” link, it takes me to the first page (which needs permission to view). Since I’m not logged in, I’m not able to view this page.

  6. hienamx says:

    To login to liferay bundle use this account:
    test@liferay.com
    test

  7. ash says:

    But, I am not able to get to the login page at all…

    here is the two solutions for this problem..

    1)
    check database for table layout and the field hidden_ corresponding to welcome page and make it 0.
    restart the server .

    2)
    ou can also login with below URL

    “http:://hostname:port/c/portal/login”

    It will display you the login portlet.

    Cheers,
    -ash

  8. Pingback: Confluence: Infrastruktur (Archive)

  9. Nicolas says:

    It works but not for the link on Logo. Do you have another trick?

    Many thanks

    Nicolas

  10. beste juicer says:

    Awesome article.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: