Foren

Making Public & Private Pages as Left Navigation Panel Tabs

Prateeksha Mandloi, geändert vor 9 Jahren.

Making Public & Private Pages as Left Navigation Panel Tabs

Regular Member Beiträge: 112 Beitrittsdatum: 05.02.14 Neueste Beiträge
Hello all,

I am trying to make Public and Private Pages as Tabs of Side navigation portlet. But I am stuck, as the links for Public and Private pages in control panel are dynamically generated,. so how should I proceed ??

Can anyone help ??

Thanks in advance
thumbnail
Sandip Patel, geändert vor 9 Jahren.

RE: Making Public & Private Pages as Left Navigation Panel Tabs

Regular Member Beiträge: 205 Beitrittsdatum: 05.01.11 Neueste Beiträge
Hi,
You can go with Liferay OOTB Navigation porltet and create hook and customize your own way to display public and private page.
If this solution becomes complex then you can create your custom porltet and with use of list of Layouts(Pages) u can display link which you want to display

Regards,
Sandip Patel
thumbnail
Subhash Pavuskar, geändert vor 9 Jahren.

RE: Making Public & Private Pages as Left Navigation Panel Tabs

Regular Member Beiträge: 234 Beitrittsdatum: 13.03.12 Neueste Beiträge
Hi,

If you want to display Public and private page as a left navigation bar then create theme in and in _diff/templates folder create vm file(Eg :side_navigation.vm)
and do something like below snippet
#foreach($group in $user.getGroups())
						#if ($group.descriptiveName==$siteName)
									#set ($globalLayouts_private = $layoutLocalService.getLayouts($group.groupId,true,0))
							   		#set ($globalLayouts_public = $layoutLocalService.getLayouts($group.groupId,false,0))
						  		#foreach ($private_layout in $globalLayouts_private)
						  			<li><a href="$portalUtil.getLayoutFriendlyURL($private_layout, $theme_display)?siteName=$siteName"> $private_layout.getName($locale) </a></li>
											#if($private_layout.hasChildren())
												<div>
													 <ul>
													 	<li><a href="$portalUtil.getLayoutFriendlyURL($private_layout, $theme_display)?siteName=$siteName"> $private_layout.getName($locale) </a></li>
														#foreach($private_layout_chilld in $private_layout.getAllChildren())
															<div>
														 		<ul>
																	<li>
																		<a href="$portalUtil.getLayoutFriendlyURL($private_layout_chilld, $theme_display)?siteName=$siteName"> $private_layout_chilld.getName($locale)</a>
																	</li>
																</ul>
															</div>
														#end
													</ul>
									 			</div>
									 		#end
								#end
					
					  			#foreach ($public_layout in $globalLayouts_public)
					  			  <li><a href="$portalUtil.getLayoutFriendlyURL($public_layout, $theme_display)?siteName=$siteName">$public_layout.getName($locale)</a></li>
												#if($public_layout.hasChildren())
													<div>
														 <ul>
														 <li><a href="$portalUtil.getLayoutFriendlyURL($public_layout, $theme_display)?siteName=$siteName">$public_layout.getName($locale)</a></li>
																#foreach($public_layout_chilld in $public_layout.getAllChildren())
																	<div>
														 				<ul>
																			<li>
																				<a href="$portalUtil.getLayoutFriendlyURL($public_layout_chilld, $theme_display)?siteName=$siteName">$public_layout_chilld.getName($locale)</a>
																			</li>
																		</ul>
																	</div>
																#end
														</ul>	
													</div>
												#end
								#end
						#end
				 #end


And in portal_normal add this code

#if ($is_signed_in)
			<div id="menu" style="float:left;width:20%; background-color:#882345;padding: 3px;margin-top: 8px;">
				#if ($has_navigation || $is_signed_in)
					#parse ("$full_templates_path/side_navigation.vm")
				#end
			</div>
		#end


hope above may help you .