Styling Current Navigation

I set up current navigation to use flyouts. The first level shows and second level flies out when level 1 is hovered. This works and I am happy with this. What I want to do is to style the links for level 1 such that not all are bold. Currently, level 1
is bold and level 2 is regular. This looked nice before switching to flyouts. I want only level 1 links with a level 2 flyout to be bold. I tried changing the links not having level 2 from a heading to a link. This did not help. SharePoint treats all level
one links the same. I even tried looking for a div or ID that might differentiate the different types of level 1 links and found nothing.
I checked the code and all of the level 1 links are using the style .LeftNav1. Is there any way to add a second CSS style and some conditional code to help SharePoint know which style to use?
Mike

Mike,
The <li> parent of menu items that have a flyout should include a class, .dynamic-children, i.e.
<ul class="static">
<li class="static dynamic-children">
<a class="static dynamic-children selected menu-item" href="#">
link
</a>
<ul class="dynamic" />
</li>
<li class="static"/>
</ul>
Both SP 2010 and 2013 OOTB create a similar nav structure.
Let's look at the following css:
<style>
.menu-item {
font-weight: bold;
.dynamic-children > .menu-item {
font-weight: normal;
</style>
This is saying that all tags with class menu-item should be bold while those menu-item's that have a direct parent that has a class dynamic-children should not be bold. Hopefully you can find a similar parent container class and similar css as above to get
the outcome you require.
Eric Overfield - PixelMill -
ericoverfield.com -
@EricOverfield

Similar Messages

  • How to show all the levels of managed metadata in Current navigation in SP 2013

    I am trying to use Managed metadata navigation as Current navigation/Left navigation Bar in a SharePoint intranet publishing site. I found one problem when I was configuring it:
    If we have the terms in the term set defined as follows:
    ├─> Root1
    │    ├─> L11
    │    │   ├─> L21
    │    │   │   └─> L31
    │    │   └─> L22
    │    ├─> L12
    │    └─> L13
    ├─> Root2
    └─> Root3
    (Please consider the indents as children of parent terms).
    So, there are 3 root terms and 4 levels of nesting in the terms. When I configured this for navigation it showed me only the 1st level by default i.e. Root1 -> L11, L12, L13 , Root2, Root3 in the navigation. So, the navigation is not fully displayed. If
    I navigate to a lower level, it shows me one more level below it and does not show the parent i.e. on navigating to L12, to shows me L21 and L22, but does not show the child L31 and the parent Root1. I presumed it would show me the full hierarchy.
    I did some probing around and figured that I could fix this by changing the master page. I navigated to the html file of the master page and within the vertical navigation snippet I found "PublishingNavigation:PortalSiteMapDataSource" that had these
    properties:
    StartFromCurrentNode(true) ShowStartingNode(false)
    I changed these values, that is, set 'StartFromCurrentNode' to false and 'ShowStartingNode' to true. I also set 'EnableViewState' to true which was false by default. Still , this did not fix the navigation
    Any help would be highly helpful and appreciated. Thanks

    Hi Sara,
    Thanks for the reply. I actually modified the setting what you mentioned but still I did not get the Top Level Navigation. I guess what you mentioned will work on the Top navigation. But I am trying to display the top 3 levels in the left navigation.
    ├─> Root1
    │    ├─> L11
    │    │   ├─> L21
    │    │   │   └─> L31
    │    │   └─> L22
    │    ├─> L12
    │    └─> L13
    ├─> Root2
    In the above tree, when i click on the L31 then the navigation is looking like 
                ├─> L21
                │   └─> L31
                └─> L22
    But I want to display like the below
        ├─> L11
        │   ├─> L21
        │   │   └─> L31
        │   └─> L22
    Regards... Mahesh

  • Adding a Left Navigation in the place of Current navigation in SharePoint 2013 Site.

    Hi All,
    I have successfully converted an HTML Page to a SharePoint 2013 Master Page. I also created a Custom Page Layout. Using both them I have created my SharePoint Site with 30+ pages. Each page is consisted with the Top Header Navigation as it is inheriting
    from the Master Page I have used. Now I need the left navigation inherit from the master page also. It gives me the advantage of updating it from the master page and affects it through the entire SharePoint Site. 
    But at the moment I am inserting the Left Nav using a web part as an HTMl code snippet individually for each and every page. If needs a modification I have to go through all the pages and do the modification. This is not convenient also. I want to this left
    nav like the SharePoint Current Navigation alternative but within my Page Layout.
    Is there an option to chat within these forums?
    Could someone help me to solve this problem?
    Thanks and regards,
    Chiranthaka

    Hi Chiranthaka,
    Thank you for posting in MSDN forum.
    Since
    this forum is to discuss: Visual
    Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.
    Based on your issue,
    it is more related to the sharepoint, so I’m afraid that
    it is not the correct forum for this issue.
    In addition, I find that you have been posted this issue in this SharePoint forum:
    https://social.msdn.microsoft.com/Forums/en-US/7e3af32b-2bf8-41f5-9420-9265ed64458c/adding-a-left-navigation-in-the-place-of-current-navigation-in-sharepoint-2013-site?forum=sharepointgeneral ,
    so we will merge this case to the above case, I think that the SharePoint expert will follow up your issue.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Show 2 level hierarchy in Managed Navigation menu(Current Navigation) in SharePoint 2013

    We have enabled Managed Navigation in SharePoint 2013 Publishing Site. Now when a user browses a page we want to show the current page siblings are its parent links in the Managed Navigation. Right now its showing only current page siblings in managed navigation.
    Is there any way to show current page parent links in Managed Navigation menu?
    For example I have a term set enabled for managed navigation with following terms:
    Level1
        Level 1.1
            Level 1.1.1
            Level 1.1.2
            Level 1.1.3
    Level 2
        Level 2.1
            Level 2.1.1
    Level 3
        Level 3.1
    Level 4
        Level 4.1 
    Now if a user is on page Level1.1.1 then Current Navigation should show following hierarchy in using Managed Navigation :
    Level 1.1
        Level 1.1.1 -> This node will be shown as selected
        Level 1.1.2
        Level 1.1.3
    Level 2.1
    Level 3.1
    Level 4.1
    Is the above behaviour possible by doing any out of box configuration or using SharePoint designer?
    Thanks,
    Anna Jhaveri

    Ha i was given the same task by my client but they wanted it to be done in client side rather than creating new user control and inheriting from actual control.
    i used Jquery and css to achieve staticlevel 3+  left navigation in sharepoint 2013. first of all let me explain the structure i had created.
    HR department
     -->Level 1
    ---->Level 1.1
    ------>Level 1.1.1
    ------>Level 1.1.2
    -->Level 1.2
     (same as above structure)
    all i did was setting up the staticlevel ="2" and dynamiclevel="3"
    so this would make left navigation with two level  and remaining of its sub sites as flyouts
    Part-1:
    so i used Js to convert all the flyout(dynamic class ) to static $(function(){  
    $("ul.dynamic").removeClass('dynamic').addClass('static');$(".dynamic").removeClass('dynamic').addClass('static');  $(".static").removeClass('dynamic-children'); $("#zz12_RootAspMenu > li:nth-child(n) > ul").removeClass('dynamic-children');
    $("leftnavigation ID"> li:nth-child(n) > ul > li.static > ul").removeClass('dynamic-children');              $("leftnavigation ID" > li:nth-child(n) > ul > li.static > ul > li:nth-child(n) > ul").removeClass('dynamic-children')
    $(".ms-navedit-flyoutArrow").removeClass('dynamic-children').removeClass('ms-navedit-flyoutArrow');
    by using this script all the dynamic classes get convert to static. after getting rid of classes call "dynamic" and "dynamic-children"
    second part :
    now we have convert all the dynamic level to static (just look wise) but functionally  its behaviors is like flyout menu items.so the following js adds the static behavior classes so it just functions like static menu
    $(function()
    var path = window.location.pathname;
    path = path.replace(/\/$/, "");
    path = decodeURIComponent(path)
    $("left nav ID" > li > ul > li.static.selected > ul > li > a").each(function () {
    var href = $(this).attr('href');
    if (path.substring(0, href.length) === href)
    $(this).closest('li').addClass('selected');
    $(this).removeClass('ms-core-listMenu-selected').addClass('selected').addClass('ms-core-listMenu-selected');
    else
    $(this).closest('li').removeClass('selected');
    $(this).removeClass('selected').removeClass('ms-core-listMenu-selected');
    How above code works:
    it  takes the url path of current page and compare it with the all the anchor elements href ,so when it finds the match it would go insert the static level class  like "selected" in the <li> and "ms-core-listMenu-selected" in the <a>
    tag so  they function like static.
    so i have done it for 4 levels so i had to put one more function as shown above to target and read <a> tag href values for 4th level and compare it with current page url.
    i didn't explain in detail in here, i'll be writing up again on this issue on  my blog with screen captures soon.
    Till then you can leave comments and questions.
    Disadvantage :this doest work if you have anything listed other then Subsites(pages,list,libraries) in left navigation.

  • SharePoint 2013 Blog Site not showing current navigation(Left Navigation)

    I have created a blog site but blog pages are not showing my current navigation, it has got its own left navigation, Can i show left (current) navigation? I am trying to find the page layout being used for blog items but unable to find.

    Hi,
    By design, there is a left navigation in the blog site. Like the following image show.
    Please check whether there is CSS style in site to hide the left navigation.
    If you don’t want to use the default navigation, we can also customize a new one.
    We can use SharePoint designer 2013 to modify it(In /_catalogs/masterpage/seattle.master ).
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Parent (Global) and Current (Navigation) on the Same Page

    Hello,
    I am using the managed metadata feature in a SharePoint 2013 publishing site.  I am trying to layout my navigation as shown in the diagram below.  I can not find a publishing master page that implements this parent child relationship.  My
    top navigation is use the markup:
    <PublishingNavigation:PortalSiteMapDataSource ID="topSiteMap" runat="server" EnableViewState="false" SiteMapProvider="GlobalNavigationSwitchableProvider" StartFromCurrentNode="false" StartingNodeOffset="0"
    ShowStartingNode="false" TrimNonCurrentTypes="Heading"/>
    <SharePoint:AspMenu ID="TopNavigationMenu" runat="server" EnableViewState="false" DataSourceID="topSiteMap" AccessKey="&lt;%$Resources:wss,navigation_accesskey%&gt;"
    UseSimpleRendering="true" UseSeparateCss="false" Orientation="Horizontal" StaticDisplayLevels="1" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="1" SkipLinkText=""/>
    I have tried using the same markup, using a different StartingNodeOffset and SiteMapProviders, for the side menu with no success.
    Thanks,
    Bob

    Hi,
    According to your post, my understanding is that you wanted to create Parent (Global) and Current (Navigation) on the Same Page.
    You can make quicklaunch work contextually like structural nav quicklaunch using Managed Metadata navigation. Please refer to:
    Managed Metadata Navigation - How do you make quicklaunch work contextually like structural nav quicklaunch?
    In addition, you can used JQuery and CSS to achieve staticlevel left navigation in SharePoint 2013.
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/forums/sharepoint/en-US/54edc501-0594-49e3-86b2-40ecf72bc68e/show-2-level-hierarchy-in-managed-navigation-menucurrent-navigation-in-sharepoint-2013
    More information:
    Overview of managed navigation in SharePoint Server 2013
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to get current navigation data using C#

    Hi,
    Please help me to get the current navigation data using c#.
    In detail, In my sharepoint 2013 site, if i navigate to the Site Actions -> Settings ->Navigation -> Current Naviation and add some link it should show on my web part.
    I am trying to create  a new web part and this web part should show the content of Current Navigation (under settings).
    Thanks in advance.

    Hi Lakshmanan,
    Thanks for your reply.
    I need more CSS customization so i am looking for C# code and i got the code. i am getting all the subsites but child nodes of subsites are showing zero even though the subsites having another subsites and pages.
    I have tried the below scranario,
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.navigation.spnavigation.quicklaunch.aspx
    Please help me on this. This is very urgent for me.
    Thanks a ton.

  • How to display current navigation on "Body only" page layout

    I create a new page and applied "Body only" page layout which is basically PageFromDocLayout.aspx
    But it doesn't show current navigation. How do I show current navigation on left side of the page? I have the code which will display current navigation but I don't know where to paste it inside page layout because there doesn't seem to be any space for that.
    Or is it something that I can enable disable from somewhere?

    There is no QuickLaunch snippet. There is one by the name of "Vertical Navigation" which I think is QuickLaunch snippet so I copied its code in PlaceHolderMain section inside page layout but getting error:
    ContentPlaceHolder can only be used in .master files.
    EDIT
    Ok I managed to do it by adding Vertical Navigation inside a separate <td> in my master page and then I only display it when page is not home page. So the is something like:
    HTML CODE IN MASTER PAGE
    <td id = "leftmenu" style="display:none">Vertical Navigation code here</td>
    <td>ContentPlaceHolderMain here</td>
    JAVASCRIPT CODE
    if(page is not home page then)
              document.getElementById("leftmenu").style.display = "block";

  • Using Anchor Tag in SharePoint Global and Current Navigation

    I have a site page set up for News articles within our company that get created every month. We are using the current navigation as sort of a list with the corresponding months that the articles were created. So for instance
    Jan
    Feb
    March
    April
    and so on
    What needs to happen is that when a user selects the month, it will scroll down to the #anchor which corresponds to the month.
    When entering the url (http://contoso.com/default.aspx#March) into the current navigation, and hitting ok. The main link remains (http://contoso.com/default.aspx)
    without the anchor tag being kept. Any Ideas?
    Thanks, Danny Hickman IT Support Specialist

    For a start, try adding a content editor webpart to the page where you want the navigation change.
    Edit the webpart and under source editor, copy paste the code below using script tags.
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
    <script>
    $(document).ready(function(){
    $anchorResults = $('a').filter(function() {
    var txt = $(this).text();
    return (txt.length > 1 && txt[0] == '#');
    $.each($anchorResults, function (index, value) {
    var txt = $(value).text().substring(1);
    var href = $(value).attr('href') + '#' + txt.replace(/ /g, '');
    $(value).text( txt );
    $(value).attr('href', href);
    </script>
    Let me know how it works out!
    Thanks, Ransher Singh, MCP, MCTS | Click Vote As Helpful if you think that post is helpful in responding your question click Mark As Answer, if you think that this is your answer for your question.

  • How to get  a Current Navigation model  Current Selection (node) ID

    Hi,
    we are using default navigation model for page navigation in our application.
    I am trying to get Id of Default Navigation model node, I am able to get the Title using following code which available in globe template.
    Code – pageTemaplate_globe.jspx :
    <af:forEach var="node" varStatus="vs"
    items="#{navigationContext.defaultNavigationModel.listModel['startNode=/, includeStartNode=false']}">
    <af:subform id="pt_sfm1">
    <div class="bea-portal-book-primary-menu-single-item">
    <af:switcher id="pt_sw1"
    facetName="#{(empty node.attributes['Target']) || (node.attributes['Target'] == '_popup') ? 'command' : 'golink'}">
    <f:facet name="command">
    <af:commandLink id="pt_cl1" text="#{node.title}"
    action="#{MyAccBean.menuItemListAction}"
    disabled="#{not node.navigable}"
    actionListener="#{navigationContext.processAction}"
    clientComponent="#{node.attributes['Target'] == '_popup' ? true : false}">
    <!-- pass node to processAction for setting current selection and navigation -->
    <f:attribute name="node" value="#{node}"/>
    <af:setActionListener from="#{node.title}"
    to="#{pageFlowScope.menunodetitle}"/>
    I am using +<af:setActionListener/>+ to set Title to variable and using in that in code.
    Is there a way that i can get ID in the same way as title?
    I see following EL from documentation but there is no ID attributes available.
    EL: #{navigationContext.defaultNavigationModel.currentSelection.attributes['Description']}
    EL: #{navigationContext.defaultNavigationModel.currentSelection.title}
    Please help me…
    Thank you,
    SP

    Hi.
    Doesn't exist direct access to node Id but you can use this EL Expression to get it:
    #{node.prettyUrlPath[node.depth]}Regards.

  • SharePoint Foundation 2013 - Treeview current navigation linking to wrong page

    Good day,
    We are having issues with the OOTB tree view for SharePoint Foundation 2013.
    The client has a document library with a folder structure. Clicking on the first level folder (Private) navigates you to the wrong url, but when you navigate to one of its child folders, by expanding the parent folder (Private) and THEN clicking on the parent
    folder, it navigates to the right url.
    See attatched screenshots:
    Error:
    No error:

    Hey guys,
    Any update on this? Sorry for the hassle, guessing it's a SharePoint bug?
    Thanks,
    Abrie van Wyk

  • In SharePoint 2013 navigation, is it possible to add a custom link only to the left-hand menu without getting it in to the top menu dropdown?

    If I want to add a custom link to the left-hand navigation menu In a SharePoint 2013 sub-site, it can be done by visiting
    Site Settings à Navigation section and adding the link under
    Structural Navigation: Editing and Sorting section. However, this will automatically add a matching link to the top menu as a dropdown.
    (Note that Global Navigation is set to “Display the same navigation items as the parent site” where “Parent is using Structural Navigation.” and Current Navigation is set to “Structural Navigation:
    Display only the navigation items below the current site”)
    Is there a way to just add a custom link only to the left-hand menu without getting it in to the top menu dropdown?

    Hi Asanka,
     Please refer the below link which may help you to resolve your problem.
    http://blog.navantis.com/configuring-sharepoint-2013-navigation-to-span-site-collections/
    If its not helping you please let us know
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • IView specific navigation

    Dear all,
    I have a question according the "Navigation" issue in the Enterprise Portal. I would like my iView to provide an "inner" navigation ("list of links") having this behaviour
    1.) Every request may result in a different navigation state depending on the iView's state
    2.) It is displayed only if the iView itself is active/displayed.
    3.) It is visually integrated into portal navigation (e.g. in the left navigation bar)
    4.) It is displayed on the same navigation level as the iView itself, e.g. if the iView is displayed on the 2nd navigation level, its navigation is NOT displayed on the 1st level.
    As far as I understand the "NavigationConnector" architecture, I don't think that this is an appropriate technology for me and my problem. This is because 1.), 2.) and 4.) are not supported. An alternative would be the concept of "Dynamic Navigation", which I understand as follows: I always have to place a second "Dynmic Navigation" iView which fetches its list of links from the actual iView. Unfortunately this requires additional configuration effort and is not strictly visually integrated according to 3.)
    I wonder whether there is a mechanism where the iView simply tells the portal on every request about its navigation/links and the portal does the rendering. Such a mechanism is provided by  IBM's Websphere Portal called "MenuProvider". Is there such a mechanism I may use? Is there another way to fulfill 1.)-4.)?
    Thank you in advance
    Sincerely
    Peter

    Hi Daniel,
    thank you for your immediate answer!
    >Do you basically want to take the navigation hierarchy and add navigation nodes in the middle based on the current iView that is selected?
    Indeed, this is the basic idea.
    > Im not sure this would help, but there is a new feature, sometimes called WCM Nnavigation connector that enables you to create a connector that adds nodes in the middle. It is for 2004 SP20 and 2004s SP11. But even this will require some configuration at the admin level.
    This sounds interesting. Can tell me where I can find some more informations about the WCM Navigation (an URL would be fine)?
    Is it possible to update current navigation on every request? I noticed that this might be difficult when using the standard NavigationConnector due to the component's lifecycle issues: The NavigationConnector's methods are often invoked BEFORE the iView could provide the list of links. 
    > Why is it such a problem to have a dynamic navigation iView where the links are separate?
    Oh, well, this is a minor problem only. It has something to do with "usibility" because user would expect a unified "look & feel"

  • F4 Input values for variables based on Navigation Attributes

    Hi,
    We would like to use the option "Q Only Posted values for navigation"  from the set F4 mode 'Query Execution Filter Val. Selectn' in the Multiprovider specific properties.
    The problem is that  this option Works for Infoobject stored on the infocube, but It doesn't work for Navigation Attributes.
    Question : Could you please tell us how to use the option "Q Only Posted values for navigation" with _Navigation Attributes _ ?
    Thx.
    Radj.
    Edited by: Radjech Radjech on Nov 24, 2011 2:22 PM

    Hi,
    The input help only offers values for which you can select data in the current navigational state
    Check the below link ,
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20ecb78c-374a-2d10-c6af-f024f19b785d?QuickLink=index&overridelayout=true
    Only posted values for navigation - what does it mean?
    Regards,
    Satya

  • Determine own Portal Navigation URL within WebDynpro iView?

    Hello all,
    we do integrate WebDynpro-Java applications in the portal. These applications do run on the same J2EE-engine as the portal (NW04).
    The WebDynpro application now should be enabled to determine its own portal URL for deep navigation to this iView. We want to hand this URL over to another (non-portal) web-application. This application will then e.g. provide a back button to allow the user a consistent way back to where he left the portal.
    Is there a way to get the portal URL out of the portal context if the iview is a WebDynpro application?
    Thanks a lot for your answers.
    Lutz

    Hi,
    The referer should not contain the link of the webdynpro app, rather it should contain the url of the page that called the webdynpro app. So if you have a link at http://www.google.com which points to www.bouvet.no , the referer found in the code at www.bouvet.no will have the value www.google.com (ref http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z14) . If this is usable in your case, depends on what urls the innerpage uses, and wheter the iview frame creates an extra redirect which ruins all data.
    Another possibility would be to extend the webdynpro with an iview which first retrieves the current navigation node (you should find several post on how to do this) and then redirect to the webdynpro application with an extra url parameter which you can then retrieve from the HttpRequest in hte webdynpro application. Not 100% sure it will work, and it will create some extra maintenance and complexity.
    Dagfinn

Maybe you are looking for

  • Error in Saving Description of Task

    Hi @ all, i´ve got a curious phenomenon. If i create a task in an Collaboration Room or via CLP i cannt save the description of the task. The Rest of the task is saved normally. Any ideas? Greetingz Larz

  • How to transfer video from pc to iphone

    how to transfer video from pc to iphone

  • Performance sax vs dom

    Hi All, I have build a xml interface for a java application. I parse the xml files using dom parser, get the data and pass it to the java application. I know that DOM builds a in memory tree of the xml file. Will this degrade the performance of my ap

  • Journal Voucher SDK bug?

    Hi guys, I have created an add-on that reads data from a text file and creates a journal voucher. The add-on works well, but I have noticed a bug when I create a journal voucher with more than one currency. The bug does not seem to be from my code. I

  • My iPod show total white screen as soon as I connect it to my PC and cannot syncronize

    My iPod nano 6th generation cannot syncronize anymore to the PC (I tried with three different PC with latest iTunes installed) and as soon as I connect it to the PC the icons on the screen disappear and it shows total blank white sreen. And it has lo