|
|
#1 |
|
Member
Join Date: Dec 2006
Posts: 96
Rep Power: 12 ![]() |
Hi all
I am intending to show the newest listings from my 68C system on the frontpage of my site. I am doing this using: {new_listings number=8 cols=3 table_attr='width="100%" ' td_attr='valign="middle" align="left"'} This works fine, but I am having trouble formating the display the way I want. What I would like to do is to use the standard class="{cycle values="row1,row2" advance=false}". I have tried to do this as shown uder, but that gives me a smarty error: Fatal error: Smarty error: [in layout.tpl.php line 78]: syntax error: invalid attribute name: '=' (Smarty_Compiler.class.php, line 1536) in /home/landsnet/public_html/includes/classes/smarty/Smarty.class.php on line 1095 The code I have used in layout.tpl.php: <TD COLSPAN=5 ROWSPAN=3 background="templates/{$smarty.const.MAIN_TEMPLATE}/images/layout_25.gif" WIDTH=185 HEIGHT=240 ALT="">{new_listings number=8 cols=3 table_attr='width="100%" ' td_attr='valign="middle" align="left" class="{cycle values="row1,row2" advance=false}" '}</TD> Anyone? Thanks! Objelland
__________________
objelland V3.1.5b Developer |
|
|
|
|
|
#2 |
|
Coder
Join Date: Mar 2006
Posts: 4,564
Rep Power: 111 ![]() ![]() |
new_listings is a smarty function and combines php to do the query and html and style functions then presents them to the template already formatted etc. To make changes you will likely need to modify the new_listings function itself.
|
|
|
|
|
|
#3 |
|
Member
Join Date: Dec 2006
Posts: 96
Rep Power: 12 ![]() |
Hi
Thank you for your reply. I will look into it. Regards Oyvind
__________________
objelland V3.1.5b Developer |
|
|
|
|
|
#4 |
|
Member
Join Date: Dec 2006
Posts: 96
Rep Power: 12 ![]() |
I have looked into the new_listings function, but I am not that familiar with smarty code.
I have tried to add the background color to the td_attr but with no luck. I also don't know how to alternate between row1 and row2. Can anyone give me a hint on this? I would like to do this myself, but right now my knowlegde stops me. Any help is highly appreciated. Thank you! Regards Oyvind
__________________
objelland V3.1.5b Developer |
|
|
|
|
|
#5 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,118
Rep Power: 118 ![]() |
I believe I just learned something new. It appears arrays are cycled for those attributes. However there is a bug in the plugin.
To get it to work you can open the plugin file and replace $c with $x. Next change your template call to this: Code:
{assign var='myarray' value=','|explode:"class='row1',class='row2'"}
{new_listings number=8 cols=3 table_attr='width="100%" ' td_attr=$myarray}
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules |
|
|
|
|
|
#6 |
|
Member
Join Date: Dec 2006
Posts: 96
Rep Power: 12 ![]() |
This works great!
Thank you very much for your help, really appreciate it!! Oyvind
__________________
objelland V3.1.5b Developer |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Modification: Civs Similar Listings keeps visitors longer | civ | v3.1 Modules & Modifications | 13 | 05-25-2008 08:17 PM |
| V4 Changes | Eric Barnes | v4 Questions & Support | 24 | 11-12-2007 01:35 AM |
| How to display category total listings? | dankellaway | v3.1 Questions & Support | 2 | 03-13-2007 01:25 PM |
| Mystery CSS Style Affecting Template... | sedonagate | v3.1 Questions & Support | 4 | 09-22-2006 02:49 AM |
| Top Listings | sbuell20 | v3.1 Questions & Support | 0 | 09-02-2006 12:11 PM |