|
|
#1 |
|
Senior Member
Join Date: Jun 2006
Posts: 172
Rep Power: 16 ![]() |
I see in the CSS that there is a section for altertnating row color, yet it doesn't display on the site. Any ideas what needs changing or what look for?
|
|
|
|
|
|
#2 |
|
Moderator
|
HTML Code:
<td class="{cycle values="row1,row2" advance=false}">some text</td> <td class="{cycle values="row1,row2" advance=false}">some text</td> <td class="{cycle values="row1,row2" advance=true}">some text - last cell in row.</td>
__________________
John Snyder PHP Developer |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Mar 2006
Posts: 110
Rep Power: 16 ![]() |
John,
Where abouts does the code in your last post go? sleepy |
|
|
|
|
|
#4 |
|
Moderator
|
I copied this from userbrowselistings.tpl.php and removed the cell content. you can put it in any foreach loop in the templates.
You might use this for any number of forms as is done in the administration panel. HTML Code:
{foreach from=$results item="entry"}
<tr>
<td class="{cycle values="row1,row2" advance=false}">{$entry.something}</td>
<td class="{cycle values="row1,row2" advance=false}">{$entry.something}</td>
<td class="{cycle values="row1,row2" advance=true}">{$entry.something}</td>
</tr>
{/foreach}
__________________
John Snyder PHP Developer Last edited by juven14; 06-25-2006 at 06:25 PM. |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jun 2006
Posts: 172
Rep Power: 16 ![]() |
OK. I found that, tried it and it worked, but then it overrides the highlighted ads. Is it a either/or situation?
|
|
|
|
|
|
#6 | |
|
Coder
Join Date: Mar 2006
Posts: 4,589
Rep Power: 111 ![]() ![]() |
Quote:
Can you post a chunk of code you implemented and the name of the file you used it in? |
|
|
|
|
|
|
#7 |
|
Moderator
|
Try something like this:
HTML Code:
{if $entry.class=="featured"} class="{$entry.class}"{else} class="{cycle values="row1,row2" advance=false}"{/if}
__________________
John Snyder PHP Developer Last edited by juven14; 06-26-2006 at 09:33 AM. |
|
|
|
|
|
#8 | |
|
Member
Join Date: Apr 2009
Posts: 52
Rep Power: 3 ![]() |
Quote:
For example: Trading Hub Classifieds Australia Arts/ Craft, Hobbies Paintings the top two should be featured ads. my code looks like: HTML Code:
{foreach from=$results item="entry"}
<tr>
{if $sDisPhoto == "Y"}
<td{if $entry.class=="featured"} class="{$entry.class}"{else} class="{cycle values="row1,row2" advance=false}"{/if}><a href="{$entry.link}" title="{$entry.title}">{if $entry.image != ""}<img src="thumbs/small_{$entry.image|escape:"url"}" border="0" alt="{$entry.title}" />{else}<img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/nophotosmall.gif" border="0" alt="{$entry.title}" />{/if}</a></td>
{/if}
{if $sDisTitle == "Y"}
<td{if $entry.class=="featured"} class="{$entry.class}"{else} class="{cycle values="row1,row2" advance=false}"{/if}><a href="{$entry.link}" title="{$entry.title}">{$entry.title}</a></td>
{/if}
{if $sDisPrice == "Y"}
<td{if $entry.class=="featured"} class="{$entry.class}"{else} class="{cycle values="row1,row2" advance=false}"{/if}>{$entry.price|format_money}</td>
{/if}
</tr>
{foreachelse}
__________________
Jermayn Parker v4.1.3 Developer using deapsea as a template for hack m y own |
|
|
|
|
|
|
#9 | |
|
Senior Member
Join Date: Jan 2007
Posts: 383
Rep Power: 19 ![]() |
Quote:
Others may come along with a more knowledgeable answer but I believe the alternating rows are controlled by your CSS file. The following is a section I've copied from my own: /* Featured Listings
__________________
M Michael V4.1.3 Developer - 3 Column Default Template "All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642) |
|
|
|
|
|
|
#10 |
|
Genius At Work
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 867
Rep Power: 23 ![]() |
I just use:
<tr bgcolor="{cycle values="#eeeeee,#FFFFFF"}"> Nick
__________________
Nick Bowers 68c v4.09 Developer Custom Template |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Alternating background colors in search results view | spaceboy | v3.1 Modules & Modifications | 1 | 09-19-2006 09:19 AM |
| Highlighted and Standard Colors | garysmith | v3.0 Questions & Support | 6 | 03-29-2006 07:42 PM |