Creating a dropdown for Roles in Top Level Navigation

Hi,
I am trying to customize the com.sap.portal.navigation.toplevel.par file.
Can anybody please help me to create a dropdown for various roles in the portal,if the user clicks on the first role in the Top Level Navigation ,he should see a dropdown list with worksets of the role.
Any help would be really appreciated
Thanks
Art Tech.

Hello Art Tech,
I hope I understand you right. You want to change the appearance of the custom built TLN according to the currently chosen portal theme, just like the standard TLN would change its appearance.
Well, if so, then there are two ways:
1) The HTML and styles/classes of your custom built TLN are still more or less the same as in the standard or you can at least reuse most of the standard HTML output/structure, then applying a new theme would also affect your custom TLN.
2) You have your own HTML output for the TLN, not relying on anything from the standard TLN, and you most probably work with a custom stylesheet file (e.g. "tln.css"). What you have to do then is to provide a set of TLN stylesheet files for each portal theme you want to support and include it accordingly by retrieving the current theme's name via the ILafService (Look & Feel Service). Or you rely on only one CSS file, then have as many "blocks" of styles (marked with a preceding class selector like in e.g. ".themeNameA ul li a " and ".themeNameB ul li a ") as you have themes, and put a bracket around the TLN-output with class="currentThemeName". For this last approach I give you the sample code (assuming you want to support the themes "SAP Standard", "SAP Tradeshow" and "SAP Chrome"):
The TLN code: tln.jsp
&gt;<%@ taglib uri="NavigationTagLibrary" prefix="nav" %>
&gt;<%@ page import = "com.sapportals.portal.prt.service.laf.*" %>
&gt;<%@ page import = "com.sapportals.portal.prt.runtime.PortalRuntime" %>
&gt;<%
&gt;// include the TLN stylesheet
&gt;response.include(componentRequest, componentRequest.getResource("css", "css/tln.css"));
&gt;
&gt;// retrieve the current theme's technical name
&gt;ILAFService iLAFService = (ILAFService)PortalRuntime.getRuntimeResources().getService(ILAFService.KEY);
&gt;String currentTheme = iLAFService.getCurrentTheme(componentRequest).getThemeName();
&gt;%>
&gt;
&gt;&lt;div class="<%=currentTheme%>"&gt;
&gt;  &lt;ul&gt;
&gt;  <nav:iterateInitialNavNodes>
&gt;    &lt;li&gt;<nav:navNodeAnchor navigationMethod="byURL" />
&gt;    <!-- second level ? -->
&gt;    &lt;/li&gt;
&gt;  </nav:iterateInitialNavNodes>
&gt;  &lt;/ul&gt;
&gt;&lt;/div&gt;
The stylesheet: tln.css
&gt;.sap_standard ul li {background-color:#FFCCCC}
&gt;.sap_standard ul li a
&gt;
&gt;.sap_tradeshow ul li {background-color:#CCCCFF}
&gt;.sap_tradeshow ul li a
&gt;
&gt;.sap_chrome ul li {background-color:#CCCCCC}
&gt;.sap_chrome ul li a
I hope this solves your problems.
Best regards,
Sven Kannengiesser

Similar Messages

  • Creating a dropdown for Roles

    Hello All,
    Can anybody please help me to create a dropdown for various roles in the portal,so that if the user clicks on the first role in the Top Level Navigation ,he should see a dropdown list with other roles being displayed and listed to be selected ...
    Any help would be really appreciated
    Thanks

    hi subhash.....
    are u trying this in PDk or in WebDynPro.....???
    if its in PDK...the following code will work....
         public DefaultListModel getRoleModel() {
              roleList = new DefaultListModel();
              roleList.setSingleSelection(true);
              roleFactory = UMFactory.getRoleFactory();
              try {
    //               String[] roles = roleFactory.getRolesOfUser(uniqueID,true);
                   searchRoleFilter = roleFactory.getRoleSearchFilter();
                   searchResult = roleFactory.searchRoles(searchRoleFilter);
                   int i = 0;
                   while (searchResult.hasNext()) {
                        Object name = searchResult.next();
                        IRole role = roleFactory.getRole(name.toString());
                        String roleName = role.getDisplayName();
                        if(roleName!=null)
                        roleList.addItem(role.getUniqueID(),roleName);
                        i++;
              } catch (UMException e) {
                   e.printStackTrace();
              return roleList;
    Regards,
    Sudheer
    Message was edited by:
            Sudheer Reddy
    Message was edited by:
            Sudheer Reddy

  • Roles in top level navigation - display order

    Hi,
    how it is possible to define the order of display roles in the top level navigation?
    If I add roles to a user in user administration the system automatically sort the roles. In this order the roles appear in top level navigation.
    I want to define my own order. How is this possible?
    Thanks in advance.
    Regards
    Andreas

    HI
    it is absolutely possible using sort priority
    http://help.sap.com/saphelp_nw04/helpdata/en/92/3e703e632c7937e10000000a114084/frameset.htm
    but  keep in mind that it is valid for all user.
    Regards,
    Vijay.

  • Maximum role in top level navigation

    Hi
    can any one tell me how many maximum role i can assign to user.
    thanks & regards
    chitta

    Chitta,
    Its Possible to assign number of roles to an user.
    A role represent the users responsiblity for his job.
    It means if a portel user is a developer he can have administration roles such as
      Content Admin, System Admin, User Admin ..etc.
    If the Portal user is end user means he need not to have Admin roles. Likewise
      a user can have number of meanful roles.
    Regards,
    <b>Ramganesan K</b>

  • Show/Hide tabs in top level navigation of a role based on assigned services

    Hi,
    I have an interesting requirement. I have created an overview page in abap web dynpro which has links to various services.
    Based on the r3 roles assigned to the user, we need to show/hide the services in the overview page and top level navigation.
    I can show/hide the views in the overview page but the links on top level navigation are created in the portal frontend by creating worksets, iviews, etc.
    Is there a way I can show or hide these worksets which are defined in the role on top level navigation?
    In a nutshell, can i update the visible/invisible property of a java workset from a call in abap web dynpro?
    Regards,
    Sumeet

    Please refer the framework page [http://help.sap.com/saphelp_nw70/helpdata/en/02/c7918e9fca44519701c47028a053fd/content.htm|http://help.sap.com/saphelp_nw70/helpdata/en/02/c7918e9fca44519701c47028a053fd/content.htm]
    What i meant was that you can do a custom TLN like this
    [http://help.sap.com/saphelp_nwce711core/helpdata/en/42/fd515a2aa95277e10000000a1553f7/content.htm|http://help.sap.com/saphelp_nwce711core/helpdata/en/42/fd515a2aa95277e10000000a1553f7/content.htm]
    Seems to me java/jsp is more appropriate than doing it via WDA.
    ANother way that you might look into this is Application integrator which again java programming effort needed.

  • Top level navigation to be re organized to come in one page

    Dear SDN,
    I have one requirement. I want to change the Portal Theme in such a way that Top level navigation to be re organized to come in one page istead of scrolling left or right. Suppose the user having more than 20 roles then he shouldnt be scrolling more times to left or right for the roles, thats why we want that in one page.
    Can anybody please help me to solve this. Is there any way where we can set all roles visible in one page??
    Thanks & Regards,
    Nikesh Shah.

    Nukesh
    I have given you the link above.
    You should read it
    There is a step wise procedure for how can you set Navigation Level to 0.
    I. Configure Top-Level Navigation
           1.      In the Portal Catalog choose Portal Users-> Standard Portal Users. This folder contains the Default Framework Page.
           2.      Right-click Default Framework Page and choose Open ->Object.
           3.      From the Page Content List, select the Top-Level Navigation iView and click Properties.
           4.      In the Navigation property category, scroll to the Number of Display Levels property and enter the value 0, 1, or 2, depending on how many navigation levels, if any, you want for top-level navigation.
    Choosing 0 removes top-level navigation and displays your navigation structure in the Detailed Navigation iView.
           5.      Click Save.
    II. Configure Detailed Navigation
           1.      From the Page Content List of the Default Framework Page, select Desktop Innerpage and click Open.
           2.      From the Page Content List of the Desktop Innerpage select the Detailed Navigation iView and click Properties.
           3.      In the Navigation property category, scroll to the Start at Level property and assign a value that is one higherthan the value of the Number of Display Levels property in procedure l. Configure Top-Level Navigation. For example, if top-level navigation is configured for one level, the detailed navigation begins on the second level, that is with the value 2.
    Detailed navigation is not automatically synchronized with top-level navigation; the values that you enter for top-level and detailed navigation must agree. For example, if you enter the value 1 for top-level navigation, while detailed navigation still has the value 3, one level is left out, creating a gap.
           4.      Click Save.
    III. Configure the Content Area
           1.      From the Page Content List of the Desktop Innerpage, select the Content Area iView and click Properties.
           2.      In the Navigation property category, scroll to the Number of Display Levels in TLN property and enter the same value as that of the Number of Display Levels property in procedure I. Configure Top-Level Navigation.
           3.      Click Save.
    Thanks...
    Edited by: Chetna  Verma on Aug 21, 2008 7:19 AM

  • How to remove the worksets from the Top level navigation for the ESS role.

    Hi All,
    I am working on enabling and disabling certain services in the ESS worksets.
    we are using EP 7.0, ECC 6.0 (NW2004s).
    When I login as a user with ESS role, I can view the changes in the overview pages. However, the worksets are still visible in the TOP Level navigation of th poral. can anyone please explain me how to remove the workset from the Top level navigation.
    Thanks for your help
    Regards
    SM

    Hi,
    Go to the ESS role via Content Admin, then double click the workset (or page or iview) and in the drop down select navigation. Then click the <i>Yes</i> radio button of the "<i>Invisible in Navigation</i>" property.

  • Problem with switching tabs in top level navigation for Roles

    Hi,
    I've created two tabs (based on two roles) in the portal top level navigation menu. When clicking the first one it opens as it should. Then when clicking on the second tab it will not open, instead the first tab open up again, it sort of switches back automatically.These  two roles  are  basically consists of worksets and iviews(accessing to r/3).
    Does anyone have any expericene with this type of problem?
    please  suggest me
    Thanks
    Aravinda

    Hi Aravinda
    Please check this link
    Re: Problem with switching tabs in top level navigation
    Regards
    Geogi

  • Display Icon/Image instead of Role name in top level navigation

    Hi,
    I want to display a image / icon instead of role name for a particular role. Can you please tell me how to achieve this ?
    Thanks,
    VP

    Hi,
    the thread is just for the background image (for all elements).
    if you want to display icons instead of role names, you have to create your custom top level navigation using the
    navigation taglib from SAP. There are lots of examples. make a blog search for Mr "Kannengiesser" from SAP.
    In case you are using already an EHPx in your EP 7.0 the AJAX framework might have this feature.
    Regards,
    Kai

  • How to hide name of Role from the top level navigation of the portal

    Hi Experts,
    In my project, I have created 2 roles Role A and Role B. These roles have been assigned to User X.
    When user X logs in, he is able to see name of role that is 'A' in the top level navigation.
    As per the requirement, user X should not see the 'A'.
    Rather user X should see following:
    Top Level Navigation: 'My Work'
    When user clicks on 'My Work', he should see
    'My Sub Work1' and 'My Sub Work2'.
    After that under 'My Sub Work1' user should see following
    All Objects of Role A
    All Objects of Role B
    Name of role i.e. 'A' or 'B' should not be displayed at all at any place in navigation.
    Only whatever objects  has been assigned to Role A and B should be displayed in detailed navigation area.
    Can you please let me know how to achieve this?
    Pictorial Diagram:
                      My Work       (In top level navigation)
    My Sub Work1    My Sub Work2    (In top level navigation)
    _________Objects of role
    A
           |
           |_________Objects of role
                                   B
    Please note that 'My  Work' and 'My Sub Work1' and 'My Sub Work2) are not roles. They are just the name of folders.
    Can you please let me know how to achieve it?
    Regards,
    Brian

    Hi Brian,
    Try the following steps.
    1. Change the 'Entry Point' property of Roles A and B to 'No'.
    2. Create a role folder called 'My Work' under A and B.
    3. Set the 'Entry point' property of this folder to 'Yes'.
    4. Set the 'merge id' property of the folder as "mywork" (or any other string) under both roles A and B.
    5. Under 'My Work' in Role A,
    a. Set the 'Merge Priority' property to 50.
    b. create subfolder 'My sub work1' and create all your objects.
    6. Under 'My Work' in Role B,
    a. Set the 'Merge Priority' property to 100.
    b. create subfolder 'My sub work2' and create all your objects.
    7. Make sure the user is assigned both the roles A and B. Only then he/she can see objects of both the roles.
    8. One thing to remember while merging folders is that, all the entities that are being merged should be at the same level. For eg: in our case, you cannot merge 'my subwork1' in role A, with 'my work' in role B.
    Reward points if helpful.
    Regards,
    Priya

  • 2 roles in top level - how?

    Hi all,
    i created two different roles in portal. "Role A" and "Role B".
    Both roles has different content:
    Role A
    ... A
    ... B
    ... C
    Role B
    ... D
    ... E
    ... F
    If i assign both roles two a portal user the system shows only "one" role. The shown role is the role where i set setting to "is entry point". The other role is missing - or hidden. What i wanna reach is that both roles should be visible in "top level".
    Like this:
    Role A
    ... A
    ... B
    ... C
    Role B
    ... D
    ... E.
    ... F
    Please look to screenshot - there you can see what i want to show in portal:
    http://img89.imageshack.us/img89/3641/portalvg5.png
    Regards,
    Adem

    Hi Adem,
    to get your 2nd role (Role B) you have two options:-
    1) set the entry point as 'Yes' for Role B.
        (for Role A also it should be yes).
    By this you will see both Roles in top level, and their contents in 2nd level of navigation.
    2) The second option is, add your Role B to your Role A as delta link.
    In this case you will see ROle B in 2nd level of navigation of Role A. And the contents of Role B will come under detailed navigation on LHS.
    You can follow any of the ways as per your requirement.
    Hope that helps...
    Regards,
    Yogesh...

  • Show a menu of roles in the Top Level Navigation

    Hello,
    Imagine a scenario where a user has many roles assigned to him (say 40 roles). In that case the user will have 40 tabs in the first level of the top level navigation and by default a horizontal scroller appears on the right part of the screen clicking on which the roles will scroll horizontally. If the user has to go to the 40th role he has to click quite a lot.
    Is it possible to have a menu option clciking on which we get the all the list of roles in the top level navigation in a vertical list and we can directly jump to any role clicking on the entry in the list ?
    Something like what we get in a tab strip in Web Dynpro.
    Thanks in advance for your valuable inputs.
    Sundeep
    Edited by: Sundeep Sethi on May 3, 2011 3:00 PM

    Hi,
    Yes it is possible to have menus as you wish .
    Look at the following links
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/6066b302-09c8-2a10-a894-eb9fef30df85
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0a1aea5-a2d1-2a10-c6bc-953bdadfdcb8?QuickLink=index&overridelayout=true
    You need to work on navigation tag libraries to extend number of levels .
    The above inks helps you only for single level of navigation.
    Regards
    Karthiheyan M

  • Hide Top level navigation if user assigned only one role

    Hi,
    I would like to hide the top level navigation if user assigned with only one role.
    I can create role based rule to show desktop using Master rule collection, but is it possible by doing to with role count.
    If user has multiple roles show desktop1 else show desktop2

    not sure if this possible ,you may check feasibility of creating  a application which checks user role count and if role count is = 1 load the Portal url (URL alais) which had TLN iview invisible in the same window else do nothing and load the portal with the desktop which has tln.
    Put the application in framewrk page which has TLN visible.
    create a URL alias and create a desktop -framework page which dont have TLN ,assign this desktop to this URL alias in rule collection set its priority before user conditions check in rule collection so that it has high priority before user or group check in rule collection.
    you can create a poc in sandbox and check if it wiorks?

  • Top Level Navigation Invisible for Administrator in EP6.0

    I have installed SAP NetWeaver 2004s SP16, EP6.0 and Developer Studio 2.0.16.  But When I log on to portal using Administrator user id, I am not getting Top Level Navigation.  I also tried other user id's.  Please provide me solution.  Thanks in advance.

    I suggest you login to Visual Administrator and check if Administrator is part of Administrators Group. You can find this by going into Services > Security Provider > User Management. Search for Administrator and check if he is part of Administrators group.
    If not add it, by default Super Admin Role is assigned to Administrators group. Once you get this role you should see all the navigational Tabs.
    Hope this helps.

  • Roles and Worksets are indicated several times in Top-level-navigation.

    Hallo Experts,
    I dont understand why the Roles and Worksets in the Top-level-navigation are displayed several times. How can I change that?
    Thank you very much
    regards,
    Galyna

    Hi,
    Which roles do you see several times?
    If it is the home tab than you might have assigned yourself for example, eu_role, eu_core_role and cc_role.
    If under the Home you see for example the Company, Work, Team... worksets twice than again you might have assigned yourself for example, eu_role, eu_core_role and cc_role.
    If these are administrative roles than might have assigned yourself these roles through multiple groups/roles assignments.
    If you will say exactly which roles/worksets you see several times we will be able to help more efficiently.
    Roy

Maybe you are looking for

  • Selcting the Logical System in BD21

    Hi,   We are using Change Pointers in the Source R/3 system so that whenever the Data changes, IDOC is trigerred to XI and then XI will send the IDOC to the Target System.   We want these modified IDOCs generated through the change pointers should go

  • Creation of IS OIL TD Shipment using Inbound IDOC Processing?

    HI Expert, We are on IS OIL 4.72E version . As part of once of our requirement we need to process inbound shipment IDOC from SCM system and create the TD Shipment document in R/3 .. Delivery is already created in R/3 ; In SCM assginement of vehicle i

  • How can I open a microsoft publisher file on my ipad

    I have a bunch of publisher files I need to port over and can't find a program to open them with. I have tried keynote, pages, documents to go and quickoffice. Please tell me there is something out there instead of having to redo them all.

  • Playing movies in sequence?

    Is it possible to create "playlists" similar to iTunes in QT so that QT will play a lists of movies in sequential order, i.e.; dragging a file into QT and having it play all the movies in that file? How can I control the play back: Skip to next movie

  • How to select the larger value of column?

    I would like a cell value (here E8) to be for example: (max $E$1:E7) + B8. Where all previous E column values were find the same calculation except for E1 that is a simple number and not a calculation? It does not work. It give the result for E1 + B8