Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Warning
titleWarning

Any user whose tabs all belong to the same group, whether or not it is the default tab group, will not see the TabGroups feature. TabGroups automatically shuts itself off in this case. This behavior is especially desirable for the guest (unauthenticated) user, who normally has only 1-2 tabs of content.

Step 1

...

: Turning on TabGroups

You can enable TabGroups in the portal.properties file. Switch the value of org.jasig.portal.layout.useTabGroups to true.

Code Block
titleportal.properties
# Whether or not to use Tab Groups (a.k.a. "Supertabs").
# This feature allows tabs to be organized into groups;  only one group of tabs 
# will be displayed at a time.  Users will experience a two-level tab hierarchy:  
# click on a tab group (top-level tab) to see the tabs in that group;  click on 
# a tab (lower-level tab) to see the portlets on that tab.
#
org.jasig.portal.layout.useTabGroups=false

Step 2

...

: Placing Tabs into Groups

Tabs can be placed into TabGroups using StructureStylesheetUserPreferences, which are stored in the portal database. NOTE: There are currently no user interface features in uPortal for managing TabGroups. All administration takes place at build and deploy time, and by manipulating the database.

...

Code Block
<!-- IDs are unique identifiers. Your ID numbers will be different. Export your layout and re-import as stated above -->
 
<?xml version="1.0" encoding="UTF-8"?>
<layout xmlns:dlm="http://www.uportal.org/layout/dlm" script="classpath://org/jasig/portal/io/import-layout_v3-2.crn" username="sample-lo">
  <folder ID="s1" hidden="false" immutable="false" name="Root folder" type="root" unremovable="true">
    <folder ID="s2" hidden="true" immutable="true" name="Header folder" type="header" unremovable="true">
      <channel fname="fragment-admin-exit" unremovable="false" hidden="false" immutable="false" ID="n3"/>
    </folder>
    <folder ID="s4" hidden="false" immutable="false" name="Footer folder" type="footer" unremovable="false"/>
    <folder ID="s16" hidden="false" immutable="false" name="My First Sub Tab" type="regular" unremovable="false">
         <structure-attribute type="folder">
                <name>tabGroup</name>
                <value>Sample Tabs</value>
        </structure-attribute>
        <channel fname="my-portlet1" unremovable="false" hidden="false" immutable="false" ID="n62"/>
    </folder>
    <folder ID="s21" hidden="false" immutable="false" name="My Second Sub Tab" type="regular" unremovable="false">
          <structure-attribute type="folder">
                <name>tabGroup</name>
                <value>Sample Tabs</value>
          </structure-attribute>
          <channel fname="my-portlet2" unremovable="false" hidden="false" immutable="false" ID="n65"/>
    </folder>
   <folder ID="s22" hidden="false" immutable="false" name="My Third Sub Tab" type="regular" unremovable="false">
        <structure-attribute type="folder">
                <name>tabGroup</name>
                <value>Sample Tabs</value>
        </structure-attribute>
        <channel fname="my-portlet3" unremovable="false" hidden="false" immutable="false" ID="n68"/>
    </folder>
    <folder ID="s23" hidden="false" immutable="false" name="My Fourth Sub Tab" type="regular" unremovable="false">
         <structure-attribute type="folder">
                <name>tabGroup</name>
                <value>Sample Tabs</value>
        </structure-attribute>
        <channel fname="my-portlet4" unremovable="false" hidden="false" immutable="false" ID="n71"/>
    </folder>
  </folder>
</layout>

Step 3

...

: Styling the TabGroups

By default, tab groups are not styled and appear as an unordered list of links. Below is an example of some css to create stylized tabs:

...