Tags:
create new tag
view all tags

Question

I have a very large list of bookmarks on a page. Each bookmark is in a styled div object that renders a box around it.

I am creating these boxes using the a form powered by the comment plugin.

Here is my issue, I want every other div object to have a different color. In other words I need to search through the page and find every other instance of this div object and then replace the style so the background changes.

I need to turn this:

<div class="Style1">
<div class="Style1">
<div class="Style1">
<div class="Style1">

Into this:

<div class="Style1">
<div class="Style2">
<div class="Style2">
<div class="Style2">

The content of the page will be changing frequently so this preferable would be done when the page is loaded not when the content is created. However, if this is the only way to accomplish this it would still be helpful.

I have a very specific style I have created that ties in with other features of my wiki's layout so using tables or anything else is out of the question.

I am looking to accomplish using either the existing twiki tools or a plugin. Any help would be greatly appreciated.

Thanks

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Missing functionality

-- GregGardinier - 04 Sep 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

If it was up to me, I'd write a script on the server to do that. It looks like a "do it once", and a rather obscure one at that wink I don't think any of the built-in tools will help you much.

-- CrawfordCurrie - 22 Sep 2007

Change status to:
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2007-09-22 - CrawfordCurrie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.