This topic is locked

Formatting rows

12/27/2008 9:05:18 AM
PHPRunner General questions
A
Astrid author

Instead of alternating colours for rows I would like to format weekdays in one colour and weekenddays in another one. Can this be done?

J
Jane 1/5/2009

Hi,
please check monthly and weekly pages in the Calendar template where this feature is implemented.

A
Astrid author 1/5/2009

Sorry Jane,

I'm not using the calendar template. I just made a list based on a database.

Fields:

Date

Event

From

To

And some extra info fields

J
Jane 1/6/2009

Hi,
you can check your date field in the List page: After record processed event on the Events tab and change row color if needed.

To check date use date() function:

if (date("w",strtotime($data["DateField"]))==0 || date("w",strtotime($data["DateField"]))==6)

{

//weekday, change row color here

}



http://php.net/manual/en/function.date.php