You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2007/12/19 07:04:11 UTC

svn commit: r605439 - in /portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/layout/tigris: decorator-macros.vm header.vm

Author: taylor
Date: Tue Dec 18 22:04:10 2007
New Revision: 605439

URL: http://svn.apache.org/viewvc?rev=605439&view=rev
Log:
multimenu, had this one sitting around for a while
displays rows of menus following folder depth
one issue is that each folder must have at least one page 
in order for this to work as it seems the site component will never select a folder if it doesnt have at least one page

Modified:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/layout/tigris/decorator-macros.vm
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/layout/tigris/header.vm

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/layout/tigris/decorator-macros.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/layout/tigris/decorator-macros.vm?rev=605439&r1=605438&r2=605439&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/layout/tigris/decorator-macros.vm (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/layout/tigris/decorator-macros.vm Tue Dec 18 22:04:10 2007
@@ -243,3 +243,35 @@
         </tr>
   #end
 #end
+
+#macro (MULTIMENU $_menu)
+        <table border="0" cellpadding="0" cellspacing="0">
+          <tr>
+#set ($found = "false")
+    #foreach($element in $_menu.elements.iterator())
+      #if($element.elementType == "option" || $element.elementType == "menu")  
+        #set($tabTitle = $element.getTitle($preferedLocale))
+        #set($tabName = $element.getShortTitle($preferedLocale))
+          #if($element.isSelected($site))
+            <td class="LTabLeft" nowrap="nowrap">&nbsp;</td>
+            <td class="LTab" align="center" valign="middle" nowrap="nowrap" title="$!tabTitle">${tabName}</td>
+            <td class="LTabRight"  nowrap="nowrap">&nbsp;</td>
+            #set ($sitem = $element)
+            #set ($found = "true")
+          #else
+            #set($tabUrl = $jetspeed.getAbsoluteUrl($element.url))
+            <td class="LTabLeftLow"  nowrap="nowrap">&nbsp;</td>
+            <td class="LTabLow" align="center" valign="middle" nowrap="nowrap" title="$!tabTitle"><a href="$tabUrl">${tabName}</a></td>
+            <td class="LTabRightLow"  nowrap="nowrap">&nbsp;</td>
+          #end
+        #else
+        #end      
+    #end
+          </tr>
+        </table>
+        #if ($found == "true")
+ 	    #if($sitem.elementType == "menu")
+	      #MULTIMENU($sitem)
+	    #end
+		#end
+#end

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/layout/tigris/header.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/layout/tigris/header.vm?rev=605439&r1=605438&r2=605439&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/layout/tigris/header.vm (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/decorations/layout/tigris/header.vm Tue Dec 18 22:04:10 2007
@@ -67,7 +67,8 @@
 #includeTabsNavigation($pagesStandardMenu $LEFT_TO_RIGHT)
       </div>
 #end
-
+## #set($multiMenu = $site.getMenu("site-navigations"))
+## #MULTIMENU($multiMenu)
 ## <!-- Back Navigation -->
 ##       <div id="breadcrumbs">
 ## #set($backStandardMenu = $site.getMenu("back"))



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org