En uPortal 3.2
1) custom/uPortal/uportal-war/src/main/resources/layout/theme/universality/navigation.xsl
Bloc de code |
---|
--- navigation.xsl.orig 2010-10-16 04:14:27.000000000 +0200
+++ navigation.xsl 2011-03-01 09:26:28.000000000 +0100
@@ -123,9 +123,27 @@
</xsl:variable>
<li id="portalNavigation_{@ID}"> <!-- Each navigation menu item. The unique ID can be used in the CSS to give each menu item a unique icon, color, or presentation. -->
- <a id="tabLink_{@ID}" href="{$BASE_ACTION_URL}?uP_root=root&uP_sparam=activeTab&activeTab={position()}" title="{@name}"> <!-- Navigation item link. -->
+ <!-- NANCY2 START : DISPLAY ONLY ONE CHANNEL -->
+ <xsl:variable name="firstChanID" select="tabChannel[1]/@ID"/>
+ <xsl:choose>
+ <xsl:when test="$AUTHENTICATED='true' and normalize-space(.) != $firstChanID">
+ <xsl:variable name="firstChanURL"><xsl:value-of select="$BASE_ACTION_URL"/>?uP_sparam=activeTab&activeTab=<xsl:value-of select="position()"/>&uP_root=<xsl:value-of select="$firstChanID"/></xsl:variable>
+ <a id="tabLink_{@ID}" href="{$firstChanURL}" title="{@name}"> <!-- Navigation item link. -->
+ <span><xsl:value-of select="@name"/></span>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a id="tabLink_{@ID}" href="{$BASE_ACTION_URL}?uP_root=root&uP_sparam=activeTab&activeTab={position()}" title="{@name}"> <!-- Navigation item link. -->
+ <span><xsl:value-of select="@name"/></span>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!--
+ <a id="tabLink_{@ID}" href="{$BASE_ACTION_URL}?uP_root=root&uP_sparam=activeTab&activeTab={position()}" title="{@name}">
<span><xsl:value-of select="@name"/></span>
</a>
+ -->
+ <!-- NANCY2 END : DISPLAY ONLY ONE CHANNEL -->
<xsl:if test="@activeTab='true' and $CONTEXT='sidebar'"> <!-- If navigation is being rendered in the sidebar rather than as tabs, call template for rendering active menu item's submenu. -->
<xsl:call-template name="subnavigation">
<xsl:with-param name="CONTEXT" select="'subnav'"/>
@@ -138,8 +156,10 @@
<xsl:with-param name="TAB_POSITION" select="position()"/>
</xsl:call-template>
</xsl:if>
- <xsl:if test="$USE_AJAX='true' and $AUTHENTICATED='true' and @activeTab='true' and not($PORTAL_VIEW='focused')"> <!-- If navigation is being rendered in the sidebar rather than as tabs, call template for rendering active menu item's submenu. -->
- <xsl:call-template name="preferences.editpage"/>
+ <!-- NANCY2 END : DISPLAY ONLY ONE CHANNEL -->
+ <!-- <xsl:if test="$USE_AJAX='true' and $AUTHENTICATED='true' and @activeTab='true' and not($PORTAL_VIEW='focused')"> --><!-- If navigation is being rendered in the sidebar rather than as tabs, call template for rendering active menu item's submenu. -->
+ <xsl:if test="$USE_AJAX='true' and $AUTHENTICATED='true' and @activeTab='true'">
+ <xsl:call-template name="preferences.editpage"/>
</xsl:if>
</li>
|
2) custom/uPortal/uportal-war/src/main/resources/layout/theme/universality/columns.xsl
Bloc de code |
---|
dans le template : <xsl:template name="columns">
remplacer : <xsl:apply-templates select="channel"/>
par : <xsl:apply-templates select="channel[1]"/>
|
Avant uPortal 3.2
- Comment permettre l'affichage du premier canal lorsqu'on clique sur un onglet ?
La solution consiste à modifier le fichier "navigation.xsl" :
...