18 Replies Latest reply on Mar 8, 2016 2:34 PM by jhoward

    Create menu - externally accessible groups

    kswallow

      Hi,

       

      Jive Support referred me here. I have been working on set up for an externally accessible groups to contain proposal content. I have a couple questions.

       

      I created a theme and used theme mapping to pull out the navigation since external users do not have access to those pages. However, the Create menu and spotlight search still appear. Here is the navigation as it appears to external contributors so that you can see what I mean:

      external_navigation.png

       

      I’m exploring a couple of options, so I’m wondering:

      1. Can the Create menu be removed from the navigation? There’s nowhere in the custom navbar soy file to do that. Can search be removed too?
      2. I have limited the content types to documents, upload files, discussions, and videos. But the Create menu shows everything (but the Actions menu shows only available content types). If we keep the Create menu navigation, can the items in the Create menu drop down be customized? Of course, we’d only want to do this for this particular theme map for external contributors.

       

      Create Menu:

      create_menu.png

       

      Actions Menu:

      actions_menu.png

       

      Thanks,
      Kevin

        • Re: Create menu - externally accessible groups
          Scott A Johnson

          Hi Kevin,

           

          The problem you seem to be describing is that the global Create menu is just that, global. This means that the available options are determined by what is configured in the community as a whole, not necessarily by the context of the page you're viewing. The Actions menu on the other hand is filtered by context as you've noted.

           

          This being said, it is possible to filter that global list, but its probably out of the scope of the theme and requires backend changes. We've made a similar change for a customer recently using some plugin code.

           

          This solution depends on whether you're Cloud or Hosted/On-Prem.

           

          Let me know if you want more details and we can discuss.

           

          Thanks,

          Scott

            • Re: Create menu - externally accessible groups
              kswallow

              Hi Scott,

               

              Thanks for your reply. So, even though the create menu is global (like the other navigation links I removed (your view, news), there's no way to adjust that only for the theme map? Or perhaps remove altogether only for the theme map? We are on a hosted internal instance of Jive. So any other info you can provide would be helpful in understanding what we can/cannot do.

               

              Thanks,
              Kevin

                • Re: Create menu - externally accessible groups
                  Scott A Johnson

                  Hi Kevin, sorry for not responding before. I dont see why you couldn't make changes to the soy template in the theme map, however, this menu is dynamically built by data that is set by backend (Java) code.

                   

                  You could either modify the backend code to hide the create links you'd like (this is what we have done), or update the soy template to specifically ignore those specific create items when building the menu which feels more hacky. If you wanted to remove the create menu all together, this should be simple enough in the soy template.

                    • Re: Create menu - externally accessible groups
                      kswallow

                      Thanks for your reply, Scott. Yes, ideally we'd like to remove the create menu from the theme map template. That makes sense when you say it is dynamically generated. But, I'm wondering where that can be removed? I'm also being asked to remove the Content and People links from the group sub navigation menu.

                       

                      Our theme map template code for the /custom-navbar.soy is just this so I don't see how I can remove the Create menu.

                       

                      {namespace jive.nav autoescape="contextual"}

                       

                      /**

                      *

                      */

                      {template .customNav}

                       

                      {/template}

                       

                      And, this is what you see:

                      extranet_nav.png

                       

                      And, the next thing is figure out how to hide the Content and People navigation.

                       

                      Thanks,
                      Kevin

                        • Re: Create menu - externally accessible groups
                          Scott A Johnson

                          To remove it in your theme, I would modify the navbar.soy file, template called .searchArea. This is where the create menu button is included.

                           

                          The snippet looks like this:

                           

                                      /* Create nav, custom mode */
                                      {if $createMenuShown}
                                          <li class="j-nav-create j-nav-cmenu j-globalNav-li js-create-nav-container" aria-haspopup="true">
                                              {call .createMenu}
                                                  {param collapsed:($collapseCreateMenu or $mode == 'simple') /}
                                              {/call}
                                          </li>
                                      {/if}
                          

                           

                          The Content and People sub navs are included in place/header.soy, template .header in the snippet below. You'd probably have to add logic to either explicitly exclude the Content and People tabs or exclude the entire subnav if thats what you need.

                           

                                          <ul id="j-placeMainNav" class="j-placeMainNav j-placeLinks">
                                              {foreach $item in $placeTabLinks}
                                                  {if ($item.visible)}
                                                      <li id="{$item.id}-tab" data-id="{$item.id}"
                                                          {if $item.id == $place.tab} class="j-tab-selected active j-ui-elem"{/if}>
                                                          {call jive.shared.soy.actionLink data="$item"}
                                                              {param hideIcon:true /}
                                                              {param activeTab: $item.id == $place.tab /}
                                                          {/call}
                                                      </li>
                                                  {/if}
                                             {/foreach}
                                          </ul>
                          
                            • Re: Create menu - externally accessible groups
                              kswallow

                              Thanks a lot, Scott - I appreciate you responding on this post and providing the info. I was able to find where the template code is in the soy files. But, not being a developer, I'll have to find someone internally to help with the logic for Content and People removal. As for the Create Menu, I you saying that I would just need to remove that snippet you provided above or add additional code somewhere in order to not display it?

                                • Re: Create menu - externally accessible groups
                                  Scott A Johnson

                                  No worries Kevin, glad to help. If you do need more help, let me know. We've got some folks that are very experienced in Jive design and development among other things and could maybe free you up to do your (other) day job, managing the community.

                                    • Re: Create menu - externally accessible groups
                                      kswallow

                                      Much appreciated, Scott. As for the Create Menu, are you saying that I would just need to remove that snippet you provided above or add additional code somewhere in order to not display it?

                                       

                                      Thanks,
                                      Kevin

                                        • Re: Create menu - externally accessible groups
                                          Scott A Johnson

                                          You should be able to remove it or comment it out so it's not executed.

                                            • Re: Create menu - externally accessible groups
                                              kswallow

                                              Thanks for getting back to me Scott. I appreciate your help on this. I removed it altogether but the Create menu continues to show up. We do have a custom menu that Jive originally set up so I'm thinking there is something that is still triggering it to show even after I remove it from the template map navbar soy file.

                                                • Re: Create menu - externally accessible groups
                                                  Scott A Johnson

                                                  Sorry, if you're site is already customized, its a little difficult for me to help without seeing the code.

                                                    • Re: Create menu - externally accessible groups
                                                      kswallow

                                                      Hi Scott, I'm adding the code below for the navbar soy file - let me know if you see anything that would keep forcing it to display. Thanks. -Kevin

                                                       

                                                      {namespace jive.nav autoescape="contextual"}

                                                       

                                                       

                                                      /**

                                                      * Renders the main nav bar for the application.

                                                      * @see com.jivesoftware.community.navbar.rest.NavBarView

                                                      *

                                                      * @param  links A list of global nav links {@see com.jivesoftware.community.navbar.NavBarLink}.

                                                      * @param  mode simple|basic|custom

                                                      * @param? appsMenuShown Whether or not to show the apps menu.

                                                      * @param? createMenuShown Whether or not to show the create menu.

                                                      * @ param? customLinks A list of custom global nav links

                                                      * @param? customizeSite True if within the Theming UI

                                                      * @param? selectedLinkID The ID of the selected link.

                                                      * @param? useJiveViews

                                                      *

                                                      * Logos used by Theming

                                                      * @param customNavLogoType

                                                      * @param customNavLogoImageAltText

                                                      * @param customNavLogoImageUrl

                                                      * @param simpleNavLogoType

                                                      * @param simpleNavLogoImageAltText

                                                      * @param simpleNavLogoImageUrl

                                                      * @param? collapseCreateMenu

                                                      *

                                                      * @depends i18nKeys=global.add_symbol

                                                      *

                                                      * @allowDependsWildcard

                                                      *

                                                      * @depends i18nKeys=nav.bar.create.content.*

                                                      * @depends i18nKeys=nav.bar.create.description.*

                                                      * @depends i18nKeys=nav.bar.create.places.*

                                                      * @depends i18nKeys=nav.bar.create.section.content

                                                      * @depends i18nKeys=nav.bar.create.section.places

                                                      * @depends i18nKeys=nav.bar.manage.section

                                                      * @depends i18nKeys=nav.bar.addons.link

                                                      * @depends i18nKeys=nav.bar.preferences.link

                                                      * @depends i18nKeys=nav.bar.overview.link.page

                                                      * @depends i18nKeys=nav.bar.personal_settings.section

                                                      * @depends i18nKeys=profile.your_content.link

                                                      * @depends i18nKeys=profile.your_places.link

                                                      *

                                                      * @depends template=jive.nav.menu.create.*

                                                      * @depends template=jive.nav.menu.generic

                                                      * @depends path=/resources/scripts/apps/navbar/menu/apps/instances/main.js

                                                      * @depends path=/resources/scripts/apps/navbar/menu/home/navbar_menu_home_main.js

                                                      */

                                                      {template .navbar}

                                                          <ul id="j-globalNav" role="menubar" class="j-globalNav"{if $useJiveViews} data-jive-view="minimal/nav/navbar"{/if}>

                                                              <li id="mobile-menu" class="mobile-tool"><a class="j-globalNavLink" href="#"></a></li>

                                                             

                                                              {if $mode == 'simple' or ($mode == 'custom' and $customNavLogoType != 'none')}

                                                                  <li class="j-simple-nav-logo j-globalNav-li">

                                                                      {if $mode == 'simple'}

                                                                          {call .logo}

                                                                              {param mode:'simple' /}

                                                                              {param path:$simpleNavLogoImageUrl /}

                                                                              {param type:$simpleNavLogoType /}

                                                                              {param alt:$simpleNavLogoImageAltText /}

                                                                          {/call}

                                                                      {elseif $mode == 'custom'}

                                                                          {call .logo}

                                                                              {param mode:'custom' /}

                                                                              {param path:$customNavLogoImageUrl /}

                                                                              {param type:$customNavLogoType /}

                                                                              {param alt:$customNavLogoImageAltText /}

                                                                          {/call}

                                                                      {/if}

                                                                  </li>

                                                              {/if}

                                                             

                                                              {if $customizeSite}

                                                                  {let $selectedLinkID:'jive-nav-link-home' /}

                                                              {/if}

                                                             

                                                              /* PS CUSTOMIZATION: ---- */

                                                              {call .customNav /}

                                                              /* END OF PS CUSTOMIZATION ---- */

                                                             

                                                              {foreach $link in $links}

                                                                  {if $link.visible and not ($mode != 'basic' and $link.type == 'create')}

                                                                      {call jive.nav.globalLink data="$link"}

                                                                          {param customizeSite:$customizeSite /}

                                                                          {param includeCounter:$link.type == 'home' /}

                                                                          {param selectedLinkID : $selectedLinkID/}

                                                                          {param showChildren : true/}

                                                                          // If the apps or create menus are present, add a class to the last link

                                                                          {param itemCss}

                                                                              {($appsMenuShown or $createMenuShown) and isLast($link) ? 'jive-nav-link-divider j-globalNav-li' : 'j-globalNav-li'}

                                                                              {if $link.customName==true}{sp}j-custom-link{/if}

                                                                          {/param}

                                                                          {param dynamicChildren: $link.dynamicChildren /}

                                                                          {param useJiveViews:$useJiveViews /}

                                                                      {/call}

                                                                  {/if}

                                                              {/foreach}

                                                             

                                                              // Add nav item button

                                                              {if $customizeSite}

                                                                  {call .addCustomLink data="all" /}

                                                              {/if}

                                                             

                                                              {if $appsMenuShown}

                                                                  <div id="appQuickLaunchMenu" class="j-menu j-quick-menu" style="display: none;"></div>

                                                                  {if not $customizeSite}

                                                                  {call jive.shared.soy.resourceInlineJs}{param code}

                                                                      {literal}

                                                                          $j(function() {

                                                                              require(['apps/navbar/menu/apps/instances/main'], function(Main) {

                                                                                  new Main('#appsQuickLaunchLink', '#appQuickLaunchMenu', {

                                                                                      container: '#jive-nav-link-apps'

                                                                                  });

                                                                              });

                                                                          });

                                                                      {/literal}

                                                                  {/param}{/call}

                                                                  {/if}

                                                              {/if}

                                                             

                                                      /* PS CUSTOMIZATION: Force header to basic */

                                                              {if $mode == 'basic' and $createMenuShown}

                                                        <li class="j-nav-create j-nav-cmenu j-globalNav-li js-create-nav-container" aria-haspopup="true">

                                                                   {call .createMenu}

                                                                       {param collapsed:($collapseCreateMenu or $mode == 'simple') /}

                                                                   {/call}

                                                                  </li>

                                                                  <div id="menuCreate" class="j-menu j-quick-menu" style="display: none;"></div>

                                                                  {if not $customizeSite}

                                                                  {call jive.shared.soy.resourceInlineJs}

                                                                      {param code}

                                                                          $j(function(){lb}

                                                                              new jive.Navbar.Menu.Create.Main('#navCreate', '#menuCreate');

                                                                          {rb});

                                                                      {/param}

                                                                  {/call}

                                                                  {/if}

                                                              {/if}

                                                      /* END PS CUSTOMIZATION */

                                                          </ul>

                                                      {/template}

                                                       

                                                       

                                                       

                                                       

                                                      /**

                                                      * @param  bookmarksLink A link to the bookmarks dropdown.

                                                      * @param  communityName name of the root community

                                                      * @param  historyLink A link to the bookmarks dropdown.

                                                      * @param  logoutLink

                                                      * @param  mode simple|basic|custom

                                                      * @param  user The authenticated user.

                                                      * @param? container The current container the user is in (only if not in root container)

                                                      * @param? createMenuShown Whether or not to show the create menu.

                                                      * @param? collapseCreateMenu

                                                      * @param? customizeSite True if within the Theming UI

                                                      * @param? hideSatelliteDisplayName

                                                      * @param? showSearch Whether or not to show the search box.

                                                      * @param? showSatelliteMenu

                                                      * @param? spotlightSearchEnabled Whether or not spotlight search functionality is enabled.

                                                      * @param? spotlightV2Enabled Whether or not the v2 spotlight UI is enabled.

                                                      * @param? useJiveViews

                                                      *

                                                      * @depends template=jive.soy.spotlight.navbar

                                                      */

                                                      {template .searchArea}

                                                      <div id="j-links">

                                                          {if $customizeSite and $mode == 'custom'}

                                                              {call jive.theme.controls.secondaryNavigationControl /}

                                                          {/if}

                                                       

                                                       

                                                          <ul class="j-globalNav">

                                                              /* Satellite nav, custom mode */

                                                              {if $mode == 'basic'}

                                                                  // spotlight v2

                                                                  {call jive.soy.spotlight.navbar data="all" /}

                                                              {else}

                                                                  <li class="j-nav-create j-nav-user j-globalNav-li js-satellite-nav-container" aria-haspopup="true">

                                                                      {call .satelliteNav data="all"}

                                                                          {param avatarOnly:($hideSatelliteDisplayName or $mode == 'simple') /}

                                                                      {/call}

                                                                      {call jive.welcome.updateIndicator}

                                                                          {param count: 0 /}

                                                                          {param extraCssClasses:' j-navbadge-count j-ui-elem' /}

                                                                          {param type:'count' /}

                                                                      {/call}

                                                                  </li>

                                                       

                                                       

                                                                  {if $showSatelliteMenu}

                                                                      <li class="j-globalNav-li j-nav-create j-nav-user j-satNav-user-menu">

                                                                          // User Profile Arrow

                                                                          <a href="#" {if $customizeSite} data-user="{buildJson($user)|escapeHtml}"{/if} id="j-satNav" class="j-nav-user j-globalNavLink j-ui-elem" aria-label={i18nText('main.menu.user')}>

                                                                              <span class="nav-link j-ui-elem">

                                                                                  // Avatar

                                                                                  {call jive.shared.displayutil.avatar data="$user"}

                                                                                      {param hideLink:true /}

                                                                                      {param hideTooltip:true /}

                                                                                      {param size:24 /}

                                                                                  {/call}

                                                                                  <span class="j-nav-more jive-icon-glyph icon-arrow-down2"></span>

                                                                              </span>

                                                                          </a>

                                                                      </li>

                                                                  {/if}

                                                       

                                                       

                                                                  /* Create nav, custom mode */

                                                                  {if $createMenuShown}

                                                                      <li class="j-nav-create j-nav-cmenu j-globalNav-li js-create-nav-container" aria-haspopup="true">

                                                                          {call .createMenu}

                                                                              {param collapsed:($collapseCreateMenu or $mode == 'simple') /}

                                                                              {param useJiveViews:$useJiveViews /}

                                                                          {/call}

                                                                      </li>

                                                                  {/if}

                                                       

                                                       

                                                                  // spotlight v2

                                                                  {call jive.soy.spotlight.navbar data="all" /}

                                                       

                                                       

                                                                  {if $logoutLink.visible}

                                                                      {call .logoutLink /}

                                                                  {/if}

                                                              {/if}

                                                       

                                                       

                                                              <li id="mobile-search" class="j-globalNav-li mobile-tool"><a class="j-globalNavLink" href="#"></a></li>

                                                          </ul>

                                                         

                                                          /* Spotlight Search (v1) */

                                                          {if ($showSearch)}

                                                              {if $customizeSite and not $spotlightV2Enabled}

                                                                  {if $mode == 'basic'}

                                                                      {call jive.theme.controls.searchBasicControl /}

                                                                  {elseif $mode == 'simple'}

                                                                      {call jive.theme.controls.searchControl /}

                                                                  {/if}

                                                              {/if}

                                                       

                                                       

                                                              <div id="j-spotlight-search" role="search" data-mode="{$mode}"{if $useJiveViews and not $spotlightV2Enabled} data-jive-view="minimal/search/spotlight"{/if}>

                                                                  {call .searchForm}

                                                                      {param container: $container /}

                                                                      {param spotlightSearchEnabled: $spotlightSearchEnabled and not $spotlightV2Enabled /}

                                                                      {param spotlightSearchDefaultEnabled: $user.prop.search.defaultEnabled /}

                                                                      {param bookmarksVisible : $bookmarksLink.visible/}

                                                                      {param historyVisible : $historyLink.visible/}

                                                                      {param communityName: $communityName/}

                                                                      {param fieldId: 'autosearch' /}

                                                                      {param anchorId: 'searchpopupanchor' /}

                                                                      {param origin: 'spotlight' /}

                                                                  {/call}

                                                              </div>

                                                          {/if}

                                                      </div>

                                                      {/template}

                                                       

                                                       

                                                       

                                                       

                                                      /**

                                                      * @param  collapsed

                                                      * @param? useJiveViews

                                                      */

                                                      {template .createMenu}

                                                          <a href="#" id="navCreate" class="j-globalNavLink j-ui-elem" role="menuItem" aria-label="{i18nText('main.menu.create')}"

                                                                  {if $useJiveViews} data-jive-view="minimal/nav/create_menu" data-target="#menuCreate"{/if}

                                                                  >

                                                              <span class="nav-link j-ui-elem">

                                                                  <span class="jive-icon-glyph icon-pencil2 j-create-icon"></span>

                                                                  {if not $collapsed}<span class="j-navLabel">{i18nText('nav.bar.create.link')}</span>{/if}<span class="j-nav-more jive-icon-glyph icon-arrow-down2"></span>

                                                              </span>

                                                          </a>

                                                       

                                                       

                                                          {if not $useJiveViews}

                                                              <div id="menuCreate" class="j-menu j-quick-menu" style="display: none;"></div>

                                                          {/if}

                                                       

                                                       

                                                          {call jive.shared.soy.resourceInlineJs}{param code}

                                                              $j(function(){lb}

                                                                  new jive.Navbar.Menu.Create.Main('#navCreate', '#menuCreate');

                                                              {rb});

                                                          {/param}{/call}

                                                      {/template}

                                                       

                                                       

                                                       

                                                       

                                                      /**

                                                      * Renders the search form for the navbar.

                                                      *

                                                      * @param? containerType

                                                      * @param? containerId

                                                      * @param? containerName

                                                      * @param? containerBrowseId

                                                      * @param spotlightSearchEnabled Whether or not spotlight search functionality is enabled.

                                                      * @param? spotlightSearchDefaultEnabled Whether or not spotlight search functionality is enabled.

                                                      * @param? showSearchButton

                                                      * @param? bookmarksVisible

                                                      * @param? historyVisible

                                                      * @param? excludeContent

                                                      * @param? excludePlaces

                                                      * @param? excludePeople

                                                      * @param? filters

                                                      * @param communityName

                                                      * @param fieldId

                                                      * @param anchorId

                                                      * @param? noAnchor

                                                      * @param? resultFilterTypes

                                                      * @param? origin

                                                      *

                                                      * @depends path=/resources/scripts/apps/autosearch/autosearch.js

                                                      */

                                                      {template .searchForm}

                                                          <span class="j-ui-elem j-search-left"><span {if not $noAnchor}id="{$anchorId}" {/if}></span></span>

                                                          <span>

                                                              <label for="{$fieldId}" class="j-508-label">{i18nText('global.search')}</label>

                                                              <input data-spotlight-enabled="{$spotlightSearchEnabled}" id="{$fieldId}" class="j-ui-elem" data-component="autosearch" data-popup-anchor="{$anchorId}" placeholder="{i18nText('global.search')}" type="text" role="combobox"

                                                               data-hidetypes="{if not $bookmarksVisible or not $spotlightSearchDefaultEnabled}bookmarks{/if}{sp}{if not $historyVisible or not $spotlightSearchDefaultEnabled}frequent recent{/if}{sp}{if $containerType and $containerId and $containerName and $containerBrowseId}all{/if}{if $excludeContent} content{/if}{if $excludePlaces} places{/if}{if $excludePeople} people{/if}"

                                                                  data-community-name="{$communityName ? $communityName : ''}" data-filters="{$filters ? $filters : ''}" data-origin="{$origin ? $origin : ''}"

                                                                  {if $containerType and $containerId and $containerName and $containerBrowseId}data-container="{$containerType}:{$containerId}" data-container-name="{$containerName}" data-container-browseid="{$containerBrowseId}"{/if}

                                                                  {if $resultFilterTypes} data-result-filter-types="{$resultFilterTypes}"{/if}

                                                              />

                                                              <a href="#" id="mob-spotlight-cancel">Cancel</a>

                                                          </span>

                                                          <span class="j-ui-elem j-search-right"></span>

                                                          <span class="jive-icon-sml jive-glyph-delete" data-component="button" data-type="clear" data-field="{$fieldId}"></span>

                                                          {if $showSearchButton}

                                                              <button data-component="button" data-type="search" data-field="{$fieldId}">{i18nText('global.search')}</button>

                                                          {/if}

                                                      {/template}

                                                       

                                                       

                                                       

                                                       

                                                      /**

                                                      */

                                                      {template .logoutLink private="true"}

                                                          <li class="j-ui-elem j-globalNav-li">

                                                              <a href="{buildUrl('/logout.jspa')}" class="j-globalNavLink j-ui-elem">{i18nText('global.logout')}</a>

                                                          </li>

                                                      {/template}

                                  • Re: Create menu - externally accessible groups
                                    jhoward

                                    Hi Scott,

                                    We're having the same trouble as Kevin; the Create menu is available to all external users, 99% of which don't have permissions to do more than comment or create an idea (we don't want to tease them with all these other options ). We're on a cloud instance.

                                    Can you get us pointed in the right direction to get some help removing the Create menu? Maybe this plugin code you mentioned?

                                     

                                    Thanks for your help!

                                    Jessica