Forums de discussion

Develop a cross site navigation

Zhenlei Li, modifié il y a 9 années.

Develop a cross site navigation

Junior Member Publications: 51 Date d'inscription: 13/07/14 Publications récentes
Hi all,
Working on Liferay CE v6.2, my task is to create a site navigation for another site inside Social office page.
For the end user's convient, we want to provide a set of hyper links (as other site's top leavel navigation menu) inside social office page.

I knew that we can put friendly URLs anywhere, but the challenge is -- how to handle the access control for the particular login?
I want to know:
If there is a way - to retrieve other site's all avaliable pages? and also know if current logged in user got proper access right on each page?
It's better to have JAVA API for it.
Welcome any guideline.

Thank you.
thumbnail
Ahmed bouchriha, modifié il y a 9 années.

RE: Develop a cross site navigation

Junior Member Publications: 55 Date d'inscription: 04/05/12 Publications récentes
Hi Zhenlei

Will you edit the so-theme in order to achieve your need mean using velocity to build the navigation or
creating a custom portlet?

About the logged in user permission check do you mean that the navigation should only show the pages that the user can access (view permission ) on the and don't
show the others?

Best Regards
thumbnail
Olaf Kock, modifié il y a 9 années.

RE: Develop a cross site navigation

Liferay Legend Publications: 6403 Date d'inscription: 23/09/08 Publications récentes
If you want to add stuff to the main navigation in the theme, you have several options (and I'm probably missing some more options):
You can update the theme (e.g. portal-normal.vm) or rather build your own, probably based on so-theme.
You could check the custom navigation app (source linked, not updated for 6.2 yet) to get an idea of how to script changes to the navigation without touching the theme

Or you just deploy another portlet to your page(s) that contain the links that you want to see - depending on the level of integration that you're expecting.
Zhenlei Li, modifié il y a 9 années.

RE: Develop a cross site navigation

Junior Member Publications: 51 Date d'inscription: 13/07/14 Publications récentes
Thank you for the suggestions.
Yes, Ahmed & Olaf, I am going to edit so-theme's navigation. and I have no problem to define on the URLs, but the only issue on permission check as Ahmed said.
I wonder if there is a simple way to know if an user with partiular role is applicable on a page. if no, then I have to define my own role<-> site page mapping to determine if a page link should be shown or not for a logged-in user.

Good day
Femi O, modifié il y a 9 années.

RE: Develop a cross site navigation

New Member Publications: 4 Date d'inscription: 29/05/14 Publications récentes
Hi Olaf,

I'm having a navigation issue with liferay and i'm hoping you can help out.

I have a home page that has several web content display portlets. In each of the web content, i have dropped in sections of the home page in the order i would want it to appear. Now, in my template - navigation.vm, i have such a structure
<li role="presentation">
					<a role="menuitem" class="lfr-nav-item" href="#benefits">
					<span>Benefits</span>
					</a>
				</li>
				<li role="presentation">
					<a role="menuitem" class="lfr-nav-item" href="#features">
					<span>Features</span>
					</a>
				</li>
				<li role="presentation">
					<a role="menuitem" class="lfr-nav-item" href="#pricing">
					<span>Pricing</span>
					</a>
				</li>

This was done to let me jump to each section using javascript. All these links (benefits, features, pricing) appear as top level navigation but when clicked jumps to the particular ID on the page. Now, I also have links to other pages on the site which aren't the home page, e.g About, FAQ etc. When I navigate to any of these other pages and try to click on the links (benefits, features, pricing) nothing happens, it doesn't redirect back to the home page. I've tried using direct urls - www.---.com/web/guest/home-page#pricing. but it doesn't work.

Those links only work when i'm on the homepage. Your kind assistance will be really appreciated.

Rgds