Tips & Tricks: hide Home Page in menu
January 12, 2011 12 Comments
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 π
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?
Hey guys, this should be fixed now: http://issues.liferay.com/browse/LPS-15921
It will be fixed in the next Service Pack for 6.0 and also in 6.1
Thank you for letting us know π
Awesome π
Pingback: Confluence: Infrastruktur
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
Now move the second page (Welcome Page) using Drag & Drop to the top of your page tree (Configuration->Site Map).
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.
To login to liferay bundle use this account:
test@liferay.com
test
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
Pingback: Confluence: Infrastruktur (Archive)
It works but not for the link on Logo. Do you have another trick?
Many thanks
Nicolas
Awesome article.