留言板

Making Public & Private Pages as Left Navigation Panel Tabs

Prateeksha Mandloi,修改在9 年前。

Making Public & Private Pages as Left Navigation Panel Tabs

Regular Member 帖子: 112 加入日期: 14-2-5 最近的帖子
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,修改在9 年前。

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

Regular Member 帖子: 205 加入日期: 11-1-5 最近的帖子
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,修改在9 年前。

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

Regular Member 帖子: 234 加入日期: 12-3-13 最近的帖子
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 .