3 replies [Last post]
arbel's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2007
Juice: 331
Was this information Helpful?

Hi,

I'm working on this module where I have a table where as part of the theme every odd row is light blue.

I'd like to add another background color to the rows based on a value in the db for each row.

I'm really not sure how to do this? If I could somehow add a class to each tr tag that would do the trick.

anyone know how to do this. I'm currently rendering the table like so:
$output = theme('table', $header, $rows); $output is returned in the theme function/hook.

thanks

Idan

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Themeing table rows background

Adding a class to a row should be something like...

<?php
  $rows
[] = array(
   
'data' => array(
     
'Cell one',
     
'Cell two',
    ),
   
'class' => 'my-row-color',
  );
?>
arbel's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2007
Juice: 331
Re: Re: Themeing table rows background

thanks, exactly what I was looking for!

mayurpimple's picture
Offline
Joined: 05/09/2011
Juice: 4
Add row in cart page

Hi

I want to add row in cart page , I was customize [ function uc_cart_view_form ()] this function in uc_cart.module

Long time i m working on tapir table but not get separate full single row in table. please help me