baseportal | ||
Start | ||
baseportal message board | |
Welcome to the baseportal message board... Please read the FAQ.
|
Selected message: | To the list |
Message from McQ on 11/14 2003, 11:29 -06:00 EMail: mcqnet@att.net Re: Alternate colors for every recordThe documentation you read shows you how to make a table manually with HTML tags, then use a conditional perl statement with a counter to decide which background color to use. After that's decided, you use baseportals "out" command mixed with HTML table tags to constuct the table one element at a time. For your page, tinker with some code like this: # this section creates the table and writes the heading row:
# next you'll write each data record, one field at a time. the "loop" construct will perform all of the instructions between <loop> and </loop> for every record in the db. thus:
The "if" statement figures out what row you're on, so which background row color to use. The <td>$Month</td> stuff is just the HTML table data tags around the database field name (case sensitive). The $ before the field name makes it a variable, and baseportal will place the value of that field in that record in that spot. If your fieldname has special characters (like / or $), refer back to the documentation to see how to handle them. Perhaps the $_loop(fieldname) method would be helpful. If all else fails, rename the fields, leaving out the offending characters. I'm a novice here too, but the above will help, with some tweaking. A warning: it won't be quick, but if you're inclined to learn a lot, or if you'll want to customize the display of your data, it's a helpful exercise to undertake. There's lots of places on the net to find out more about constructing HTML tables, and color charts to pick the HEX codes (the #e0e0e0 stuff) for your background colors. I hope this helps, and good luck. |
|
All messages from this thread: | To the list |
Message from Ed on 11/14 2003, 00:37 +00:00 EMail: schmidte@putnam.k12.il.us WWW: www.BassFishingLog.com Alternate colors for every recordI read the section "Switch background color with every record" in the "baseportal Documentation" section, but I'm not sure where to insert the code. The code I have on my wesite now: http://www.BassFishingLog.com, is:
Where do I put the "alternate color" code? Could someone advise me on how to do it. Thanks, ED |
|
Messages from 3150 to 3300: | To the input form |
> Alternate colors for every record from Ed on 11/14 2003, 00:37 +00:00 |
Re: Alternate colors for every record from McQ on 11/14 2003, 11:29 -06:00 |
<< Newest messages | < Newer messages | To the input form | Older messages > | Oldest messages >> |
© baseportal.com. All rights reserved. Terms of use |