Forums de discussion

How to set home page url for a site?

thumbnail
Neetu Mishra, modifié il y a 11 années.

How to set home page url for a site?

Junior Member Publications: 75 Date d'inscription: 21/05/12 Publications récentes
Hi All,

My requirement is when user clicks on logo he/she should redirect to home page URL.

So, I am trying this:
Click on Go To -> Control Panel -> Portal -> Portal Settings -> General tab
and then setting Home url to /web/guest/home where home is my hidden page.

Now when I am clicking on logo, it's just refreshing the page emoticon

Please help me regarding this.

Thanks in advance!

--
Neetu
thumbnail
Tejas Kanani, modifié il y a 11 années.

RE: How to set home page url for a site?

Liferay Master Publications: 654 Date d'inscription: 06/01/09 Publications récentes
I guess as your home page is hidden, its behaving like this.
It should work if you remove hidden for home page, if your requirement permits.
thumbnail
Neetu Mishra, modifié il y a 11 années.

RE: How to set home page url for a site?

Junior Member Publications: 75 Date d'inscription: 21/05/12 Publications récentes
Tejas Kanani:
I guess as your home page is hidden, its behaving like this.
It should work if you remove hidden for home page, if your requirement permits.


Hi Tejas,

Thanks for your quick reply.

As per my observation the first non-hidden page present in the navigation bar is treated as home page url. So, it's working if I remove hidden for home page but according to my requirements my home page is a different page from the pages present on the navigation bar.

Do you have any idea how should I do this?

Thanks in advance!

--
Neetu
thumbnail
Tejas Kanani, modifié il y a 11 années.

RE: How to set home page url for a site? (Réponse)

Liferay Master Publications: 654 Date d'inscription: 06/01/09 Publications récentes
Hi Neetu,

In such case I think you can do one thing.
Just make home page visible(Remove hidden checked) and inside your theme just make modification in navigation display to not include home page in navigation bar. So in this case it will remain hidden for users. And when you click on logo it will take you to the home page.

Just a thought !! Might help you ...

Regards,
Tejas
thumbnail
Neetu Mishra, modifié il y a 11 années.

RE: How to set home page url for a site?

Junior Member Publications: 75 Date d'inscription: 21/05/12 Publications récentes
Thanks Tejas for your suggestion!

Will try to modify my navigation.vm file emoticon
thumbnail
Enrique Valdes Lacasa, modifié il y a 9 années.

RE: How to set home page url for a site?

Junior Member Publications: 92 Date d'inscription: 29/07/14 Publications récentes
Thanks for the suggestion Tejas, smart solution! I am implementing the link of my logo to go to the first page, which will be hidden in the navigation. I am pasting the code I used in Liferay 6.2. To skip the first element of the navigation items, this should be added in the navigation.vm:


#if ( $nav_item.getName() != $nav_items.get(0).getName() )
  <li> .... </li>
#end
 


It should wrap the <li> element used to iterate each navigation item as you can see.
thumbnail
Jignesh Vachhani, modifié il y a 11 années.

RE: How to set home page url for a site?

Liferay Master Publications: 803 Date d'inscription: 10/03/08 Publications récentes
Hi Neetu,

When you hover your mouse in logo link which URL its showing ?
If its showing proper home page URL then problem could be with browser caching.
Try to remove browser cache and check once.
thumbnail
Neetu Mishra, modifié il y a 11 années.

RE: How to set home page url for a site?

Junior Member Publications: 75 Date d'inscription: 21/05/12 Publications récentes
Jignesh Vachhani:
When you hover your mouse in logo link which URL its showing ?
If its showing proper home page URL then problem could be with browser caching.
Try to remove browser cache and check once.


Hi Jignesh,

If I have selected the About Us tab in tha navigation bar then it's showing me this url:
http://localhost:8080/en_GB/web/guest/about-us?p_auth=MSNDNPg5&p_p_auth=H5g1yOdy&p_p_id=49&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_count=1&_49_struts_action=%2Fmy_sites%2Fview&_49_groupId=10180&_49_privateLayout=false

But I need this 'http://localhost:8080/en_GB/web/guest/home' as a home url.

Please help me regarding this.

Thanks in advance!!

---
Neetu
thumbnail
Jignesh Vachhani, modifié il y a 11 années.

RE: How to set home page url for a site?

Liferay Master Publications: 803 Date d'inscription: 10/03/08 Publications récentes
Did you make any changes in portal-ext.properties file ?
thumbnail
Neetu Mishra, modifié il y a 11 années.

RE: How to set home page url for a site?

Junior Member Publications: 75 Date d'inscription: 21/05/12 Publications récentes
Jignesh Vachhani:
Did you make any changes in portal-ext.properties file ?


I have tried this:
company.default.home.url=/web/guest/home

but this is alse not working for me. Do I missing something here??

Thanks,
Neetu
thumbnail
Jignesh Vachhani, modifié il y a 11 années.

RE: How to set home page url for a site?

Liferay Master Publications: 803 Date d'inscription: 10/03/08 Publications récentes
Hi Nitu,

I think you were started this thread by mentioning that when you click on logo then it should go to home page.
Now you are referring something different scenario for about us page.

So if you want to point out about us page to home page then you can go to ]
manage pages >> select about use page link
and select type link to page option and point it to home page or page where you forward.

See below screenshots :

Pièces jointes:

thumbnail
Neetu Mishra, modifié il y a 11 années.

RE: How to set home page url for a site?

Junior Member Publications: 75 Date d'inscription: 21/05/12 Publications récentes
Jignesh Vachhani:
if you want to point out about us page to home page


Hi Jignesh,

This is not my requirement that about us page should point to home page. My requirement is only this that whenever user clicks on Logo then it should redirect to Home page where home page is a hidden page.

If I have selected the About Us tab in tha navigation bar then it's showing me this url:
http://localhost:8080/en_GB/web/guest/about-us?p_auth=MSNDNPg5&p_p_auth=H5g1yOdy&p_p_id=49&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_count=1&_49_struts_action=%2Fmy_sites%2Fview&_49_groupId=10180&_49_privateLayout=false


I have underlined the about us to show that it has the same name as the tab name. Please pardon if I was not very clear.

Thanks in advance!
thumbnail
Neetu Mishra, modifié il y a 11 années.

RE: How to set home page url for a site?

Junior Member Publications: 75 Date d'inscription: 21/05/12 Publications récentes
Hi Jignesh,

Tejas: Just make home page visible(Remove hidden checked) and inside your theme just make modification in navigation display to not include home page in navigation bar. So in this case it will remain hidden for users. And when you click on logo it will take you to the home page.

For now I am doing this & this working fine also but it's a cheating with the Liferay emoticon

If you have some other way then let me know, I really want to do it in some other way also emoticon


Thanks a lot Jignesh & Tejas emoticon

--
Neetu
thumbnail
Tejas Kanani, modifié il y a 11 années.

RE: How to set home page url for a site?

Liferay Master Publications: 654 Date d'inscription: 06/01/09 Publications récentes
Hi Neetu,

I would say its customization according to our requirement rather than cheating emoticon
You are trying something that is not OOTB provided/supported. In that case you'll have to make it work as per your needs by customizing it.

As far as its working using theme customization, I don't see any harm using this. Expect I guess, your home page name(home) should remain same.
Still if you found any other better solution, please do share.

Regards,
Tejas
thumbnail
Neetu Mishra, modifié il y a 11 années.

RE: How to set home page url for a site?

Junior Member Publications: 75 Date d'inscription: 21/05/12 Publications récentes
Tejas Kanani:
I would say its customization according to our requirement rather than cheating
You are trying something that is not OOTB provided/supported. In that case you'll have to make it work as per your needs by customizing it.


Hi Tejas,

Yeah very true, I agree with you. emoticon

Thanks a lot once again!! emoticon

--
Neetu