Results 1 to 5 of 5
  1. #1
    Newbie
    Join Date
    July 23rd, 2005
    Posts
    2
    generating Table Background color changes
    Is it posible within WebMerge to have a table generated that changes background color with a set number of rows within the table? Here's a link to an example that I've done:
    Example
    You will notice a yellow background on the "whole" table.
    Here's an example of what I'd like the page to look like
    Desired Look
    Working files are located here if you need to look at my code:
    Working Files

    Thank you,
    Craigar

  2. #2
    ABW Ambassador AWaR's Avatar
    Join Date
    January 18th, 2005
    Location
    Scotland
    Posts
    625
    You can have every 2nd, 3rd, 4th, etc... row a different color using the [WM-IF] statement, found at http://www.fourthworld.com/products/...gs/cTagIf.html near the bottom.

    Here's a quick example for you :
    Code:
    [WM-Record]
    [WM-If CurrentRecordNumber mod 2]
    <tr valign="top" bgcolor="#FFFFFF"> "add all the data you have before [/wm-record] here too" # this gives every even row a white background
    [WM-Else]
    <tr valign="top" bgcolor="#FFFCE0"> "add all the data you have before [/wm-record] here too" # this gives every odd row a yellow background
    [/WM-If]
    [/WM-Record]

    Dunno if v2.4 of webmerge will do exactly what you want as I'm still using v2.3

    And before I forget, you need to close your </tr> just before [/WM-Record]

    Have fun

  3. #3
    Newbie
    Join Date
    July 23rd, 2005
    Posts
    2
    AWaR,
    Thanks for the very quick response. Your advise worked perfectly!
    Craigar

  4. #4
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    AWaR -- thanks for the excellent assist. Seems like you're one of the few who really "gets" the mod operator. So handy for things like this.

    V2.4 is a free upgrade, so you might as well take advantage of the new features and significant performance enhancements.
    Richard Gaskin
    Developer of WebMerge: Publish any data feed on any site
    http://www.fourthworld.com

  5. #5
    ABW Ambassador AWaR's Avatar
    Join Date
    January 18th, 2005
    Location
    Scotland
    Posts
    625
    Quote Originally Posted by Craigar
    AWaR,
    Thanks for the very quick response. Your advise worked perfectly!
    Craigar
    No problems chief, glad it worked

    Quote Originally Posted by FourthWorld
    AWaR -- thanks for the excellent assist. Seems like you're one of the few who really "gets" the mod operator. So handy for things like this.
    What's a mod operator ??? lol

    If it's the "equals / does not equal / greater than / greater than or equal to / less than / less than or equal to / contains / DoesNotContain / is in / IsNotIn / mod ", then that's like falling off a bike, but not as sore ... you wouldn't like to see the templates or datafeed I modified for someone... You'd get lost along the way and I don't have a map for you to follow, lol

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Replies: 4
    Last Post: December 20th, 2010, 02:41 PM
  2. Replies: 19
    Last Post: June 17th, 2010, 06:29 PM
  3. Generating an index page without generating detail pages
    By Pierre (aka Terdef) in forum WebMerge (Fourthworld.com)
    Replies: 6
    Last Post: July 15th, 2005, 10:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •