Tabbed View Extension

Not final - Still testing

 

 

Vendor
Anonymous
Type Script
Categories (none)
Requires MindTouch Deki 1.8.3 or later
Status Work-in-progress
License Free/Open Source
Manifest http://wiki.developer.mindtouch.com/@api/deki/files/3585/=tabview.xml

 

Table of Contents

Description

This extension allows you to order content by tabs

See also How to add a script, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.


Functions

tab.explorer(sites) : xml

Parameters:

NameTypeDescription
siteslistContent to show in each tab


Script Source

 <extension>
  <title>tabbed explorer</title>
  <description>This extension allows you to order content by tabs</description>
  <uri.help />
  <namespace>tab</namespace>
- <function>
  <name>explorer</name>
  <param name="sites" type="list">Content to show in each tab</param>
  <description />
- <return>
- <html xmlns:eval="http://mindtouch.com/2007/dekiscript">
- <head>

  <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/tabview/assets/skins/sam/tabview.css"/>
  <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/yahoo-dom-event/yahoo-dom-event.js" />
  <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/element/element-beta-min.js" />
  <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/connection/connection-min.js" />
  <script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/tabview/tabview-min.js" />
  </head>
- <body >
  <script type="text/javascript">var myTabs = new YAHOO.widget.TabView("content-explorer");</script>
  <div id="content-explorer">
   <ul class="yui-nav">
     <eval:foreach var="site" in="args.sites">
       <eval:if test="__count==0">
       <li class="selected">
         <a href="#"><eval:expr>site.title</eval:expr><br /></a>
       </li>
       </eval:if>
       <eval:else>
         <li>
           <a href="#"><eval:expr>site.title</eval:expr><br /></a>
         </li>
       </eval:else>
     </eval:foreach>
   </ul>
   <div class="yui-content">
     <eval:foreach var="site" in="args.sites">
       <div>
         <eval:expr>site.content</eval:expr>
       </div>
     </eval:foreach>
  </div>
  </div>
  </body>
  </html>
  </return>
  </function>
  </extension>

Tag page

Files 1

FileSizeDateAttached by 
 tabview.xml
No description
1776 bytes17:25, 12 Nov 2008coreygActions
Viewing 1 of 1 comments: view all
Hi!

I am having difficulties to figure out how to use this extension.
I tried (empirically) the following code:

{{ tab.explorer{sites: [{content: "http://www.google.com", title: "Tab 1"}, {content: "http://www.yahoo.com", title: "Tab 2"}, {content: "http://en.wikipedia.org", title: "Tab 1"}]} }}

Three tabs are created, "Tab 1", "Tab 2" and "Tab 1". I would like to have only one "Tab 1" displaying all the sites which title is "Tab 1".

Could someone please give here some example of using this extension to display more than one link per tab?

Thank you! edited 19:08, 3 Mar 2009
Posted 19:08, 3 Mar 2009
Viewing 1 of 1 comments: view all
You must login to post a comment.