Support Forums

Old 01-23-2008, 09:35 AM   #1
Member
 
Join Date: Dec 2006
Posts: 96
Rep Power: 12
objelland is on a distinguished road
Default New listings - style

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
objelland is offline   Reply With Quote
Old 01-23-2008, 09:43 AM   #2
Coder
 
Join Date: Mar 2006
Posts: 4,564
Rep Power: 111
Lhotch is just really niceLhotch is just really nice
Default

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.
__________________
Larry.
Lhotch is offline   Reply With Quote
Old 01-23-2008, 10:51 AM   #3
Member
 
Join Date: Dec 2006
Posts: 96
Rep Power: 12
objelland is on a distinguished road
Default

Hi

Thank you for your reply.
I will look into it.

Regards
Oyvind
__________________
objelland
V3.1.5b Developer
objelland is offline   Reply With Quote
Old 01-23-2008, 02:12 PM   #4
Member
 
Join Date: Dec 2006
Posts: 96
Rep Power: 12
objelland is on a distinguished road
Default

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
objelland is offline   Reply With Quote
Old 01-23-2008, 02:46 PM   #5
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,118
Rep Power: 118
Eric Barnes is a jewel in the rough
Default

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
Eric Barnes is offline   Reply With Quote
Old 01-23-2008, 04:08 PM   #6
Member
 
Join Date: Dec 2006
Posts: 96
Rep Power: 12
objelland is on a distinguished road
Default

This works great!
Thank you very much for your help, really appreciate it!!

Oyvind
__________________
objelland
V3.1.5b Developer
objelland is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 07:13 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0