How to hide navigation menu in pages that are hidden in Navigation Menu in Liferay? - liferay-theme

In other words, I want to hide the navigation menu from the other private pages that have checked the option Hide from Navigation Menu in Control Panel.
In my theme, I am showing the navigation menu on private pages only:
<#if layout.isPrivateLayout()>
<#if has_navigation && is_setup_complete>
<#include "${full_templates_path}/navigation.ftl" />
</#if>
</#if>
And I want to further hide it in some of the private pages (the ones that the users open as a hyperlink). They are not part of the navigation menu as I have checked the option Hide from Navigation Menu - but the navigation menu does show up in them.
If there is no direct way of doing this, how can I get the page name and set the Navigation menu to not display in those pages.
I am using Liferay 7 CE GA2 but I believe this is a generic question.

You followed the right track. The only thing missing is the check for Layout.isHidden():
<#if layout.isPrivateLayout() && !layout.isHidden()>
<#if has_navigation && is_setup_complete>
<#include "${full_templates_path}/navigation.ftl" />
</#if>
</#if>

Related

Where is the navigation manager in VBulletin - 4.1.11?

I can't find the navigation manger in new version of vBulletin. It is under settings in newer versions but can't see it now in the 4.1.11 version. If there isn't any, how can I edit the navigation items?
Your forum is running VB 4.1.11 - The Navigation Manager was added in 4.2.0. You should upgrade to 4.2.x to get access to it. In 4.1.11 all changes required manual edits or plugins.
vBulletin 4.2 Release Note
The release contains:
Activity Stream
Navigation Manager
Members who have Visited Today
UPDATE:
1. If you don't want to upgrade you vBulletin version, you should do that manually
and it depends on your style
for example some default styles navigation bar is in head file
and you can edit from:
Admincp > Styles & Templates > Style Manager > Your Template > Edit Templates > header
If you want to know exact path of navigation bar for your style, you can search some codes of your style navigation bar in style manager search form
an exaple for navigation bar code:
<div class="cnavbar">
<center>
<div id="cnavtabs" class="cnavtabs">
<ul>
<li>Link Text</li>
<li>Link Text</li>
<li>Link Text</li>
<li>Link Text</li>
<li>Link Text</li>
</ul>
</div>
</center>
</div>
and maybe css code:
.cnavbar
{
width:100%;
height:32px; ( Change Height Here )
background-color:#150517; ( Change Background Color Here )
border-bottom:1px solid #666;
}
#cnavtabs
{
width:960px; ( Change width Here )
height:100%;
}
2. On the other hand if you don't want to do that manually you should find or request Mod or plugin that support vBulletin 4.1.x
This is a Mod to create a custom navigation for all 4.x.x version of vBulletin
[DBTech] DragonByte Custom Navigation v1 (vB4)
Hope to help you

How to delete the Navigation Menu title in liferay theme?

I created a theme and copied the navigation.ftl from Liferay Classic Theme but in my theme, The navigation title is showing up as shown in the below screen-shot.
If I am logged in as an Administrator, I am able to edit the text and make it blank and Save and it goes away. But when i refresh the page, it comes back which i think is a bug.
But my question is, What do i do in the theme so that the title doesn't show up at all anywhere.
The code snippet from navigation.ftl
<#assign VOID = freeMarkerPortletPreferences.setValue("portletSetupPortletDecoratorId", "barebone") />
<div aria-expanded="false" class="collapse navbar-collapse" id="navigationCollapse">
<#if has_navigation && is_setup_complete>
<nav class="${nav_css_class} site-navigation" id="navigation" role="navigation">
<div class="navbar-right">
<#liferay.navigation_menu default_preferences="${freeMarkerPortletPreferences}" />
</div>
</nav>
</#if>
</div>
<#assign VOID = freeMarkerPortletPreferences.reset() />
I had the same issue and found that in my custom theme (starting from the Styled theme using the Theme Generator) the portlet.ftl file had the line:
<h2 class="portlet-title-text">${portlet_title}</h2>
The portlet.ftl in the Classic theme has:
<#if portlet_display.getPortletDecoratorId() != "barebone">
<h2 class="portlet-title-text">${portlet_title}</h2>
</#if>
I added that #if statement around the h2 to my portlet.ftl and now the title is not displayed if Barebone is the chosen decorator for a portlet. This works whether Barebone is set through a template or through the Look and Feel menu in the admin.
I was able to hide the title (of Navigation Menu portlet) using the following CSS in my custom theme
.portlet-static.portlet-static-end.portlet-barebone.portlet-navigation .portlet-content.portlet-content-editable .portlet-title-text {
display:none !important;
}
Edit: The above solution worked when I logged in as an Administrator only.
I replaced it with the following to hide it for Regular users as well:
section#portlet_com_liferay_site_navigation_menu_web_portlet_SiteNavigationMenuPortlet.portlet h2.portlet-title-text {
display:none !important;
}

Ionic page transitions

Im having a hard time understanding how Ionic handles ion-nav-view vs. ion-view. I'm trying to build an app where the views are not nested (as example apps). This is what I've done
In index.html I have an ion-nav-view
I have 3 pages. 1 login, 1 list, and 1 item (item is a list item beeing clicked)
My list page is an ion-side-menus while the other 2 are ion-view's
Now to my question
When I click an item in my list I get a transition to my item page but when I go back to my list there is no page transition. This is the HTML
<ion-header-bar class="bar-dark">
<div class="buttons">
<button nav-transition="slide-left-right" class="button button-icon button-clear ion-android-arrow-back" ui-sref="list">
</div>
<h1 class="title">Item</h1>
</ion-header-bar>
How can I get transitions to work even though each page is its own ion-view?
EDIT
I solved the "transition back" using nav-direction="back"
Next problem is that transition only works ones from the list?
If i click the above the slide left transition occurs, but if I go back and press it again I don't get a transition? Is it some sort of cache?
The way I do is to have ion-side-menus inside index.html as the only directive, and inside it and with an ion-nav-view inside.
Then define an ion-side-menu with side="left" and include the list you want to show.
That way you can define a side-menu that will show throughout the whole app and be available with all the content you need.
Now to answer your question, I think the list page (in your case the one with ion-side-menus) does not have transition when going back because it is now an ion-view. The page transitions occur on ion-views when they are swapped in-out inside the . But the ion-side-menus page is not swapped in-out it's just there.
Regarding this:
EDIT I solved the "transition back" using nav-direction="back"
It worked because you explicitly told ionic that you want a nav-transition when going back.
Hope this helps a bit

How do you modify Sitefinity's breadcrumb control?

I need to modify sitefinity's breadcrumbs from this:
Home
to this:
Home >
So if the breadcrumb is on the root page, it needs to have the > after it.
Im an absolute beginner, so go easy on me! (using version 3.7)
Regards
Peter
I had a similar problem in the past and solved it by creating a custom user control with the breadcrumb control embedded within it. this allows you to add your own custom logic in the code behind to show or hide things as necessary:
<%# Control Language="C#" AutoEventWireup="true" CodeFile="BreadcrumbControl.ascx.cs" Inherits="UserControls_Internal_BreadcrumbControl" %>
<%# Register TagPrefix="sfweb" Namespace="Telerik.Cms.Web.UI" Assembly="Telerik.Cms.Web.UI" %>
<asp:HyperLink ID="lnkHome" runat="server" NavigateUrl="/" Text="My Home Page" /> »
<sfweb:Breadcrumb ID="bCrumb" runat="server" PathSeparator=" » " />
here you can hide the BreadCrumb on the home page, showing the homepage hyperlink, which you can customize to show whatever you need.
There may be a better way to do this, but this was the fastest, easiest way I could figure out to do it.
hope this was helpful!
You can easily change the mockup separator. You need to edit the Breadcrumb, click on the advanced button and find the NodeSeparatorMarkup field.
In my case I've put >> instead of >
<span class='sfBreadcrumbNodeSeparator'>»</span>;

mvc renderpartial dialog difficulty

I have a view in which I have the following code:
<div id="DivPassword" >
<%Html.RenderPartial("PasswordDetails"); %>
I want to display the div as a dialog, in which I am successful. When I click on a link the dialog opens.
However, I can see that the partial view is also being displayed in the View, when the page loads. Why is it so? How can I correct that?
It displays because your code generates markup like:
<div id="DivPassword" ><!-- contents of partial view here --></div>
When a browser sees this markup, id displays stuff. :)
In order to not display the dialog until you run some JavaScript to make it display, you need to hide it. You can do this with a CSS rule:
div#DivPassword
{
visibility: hidden;
}
Pretty much all JS dialog libraries will change the visibility when you pop up the dialog.