Tags:
create new tag
, view all tags

Question

Is there any way to get TWiki to added a DOM id and title to lists produced with the * option (bullet or number lists)?

I have a large list which I would like to include some Javascript to collapse/expand on, but most of the free scripts require that the <ul> items have an "id" and 'tree' attribute.

So I was wondering whether there was a way to specify this for all generated <ul> items on a page, or whether there was a plugin which augments the default behavior of what the TWiki list (*) operator does?

So I was thinking of something like an %LIST{id="something" title="some title"}% before the list to define the id/title to add to each generated HTML <ul> item. If a person wanted to customize each <ul> item, then it would make sense for them to just generate the raw HTML themselves. So I'm just suggesting that all lists following the %LIST{..}% would have the same values.

Or, I guess, having a generic Javascript code which doesn't depend on id= and title= would work to.

Environment

TWiki version: TWikiRelease2005x11x06x7338beta
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Fedora Core 4, kernel 2.6.14-1.1637_FC4
Web server: Apache/2.0.54
Perl version: 5.8.6
Client OS: Fedora Core 4, kernel 2.6.14-1.1637_FC4
Web Browser: Firefox 1.0.7
Categories: Javascript, Plugins

-- TaitCyrus - 28 Nov 2005

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

Not without hacking the TWiki code, no. You might want to have a look at the TwistyContrib that will be n DakarRelease before you invest too much effort, though....

-- CrawfordCurrie - 30 Nov 2005

 
Topic revision: r4 - 2006-01-02 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.