Support Forums

New Listings Plugin Query - using {$owner}

This is a discussion on New Listings Plugin Query - using {$owner} within the Modules / Plugins / Modifications forums, part of the Developer Forums category; Hey all, I'm working through an idea of mine. Basically when your viewing a certain advert, I would like to ...


Go Back   68 Classifieds Forums > Developer Forums > Modules / Plugins / Modifications

Reply
 
Thread Tools Display Modes
Old 07-23-2011, 11:23 AM   #1
Member
 
Join Date: Apr 2011
Posts: 30
Rep Power: 4
performancecentral is on a distinguished road
Default New Listings Plugin Query - using {$owner}

Hey all,
I'm working through an idea of mine.

Basically when your viewing a certain advert, I would like to show a horizontal list of say 4 adverts at the bottom of the page of that particular owner.

I was using this particular code at the moment:

{listings number="3" sort_column="dateadded" assign="new_listings" featured="n"}
<h2>New Listings</h2>
{foreach from=$new_listings item="entry"}
{$entry.title} - {$entry.price}</br>
{/foreach}



I was thinking about using:
owner="{$owner}

but for some reason it would not be read as an integer when inputted into the code as below:

{listings number="3" owner="{$owner} sort_column="dateadded" assign="new_listings" featured="n"}

Any advice would be much appreciated

Thanks again
performancecentral is offline   Reply With Quote
Old 07-23-2011, 01:30 PM   #2
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,423
Rep Power: 75
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Three things from your posted code:
{listings number="3" owner="{$owner} sort_column="dateadded" assign="new_listings" featured="n"}

1) The owner field has a starting quote, but no ending quote.
2) You can not use the smarty "{}"'s within a smarty call.
3) You do not use quotation marks when assigning a parameter with a variable within a smarty call.

Try this instead:
{listings number="3" owner=$owner sort_column="dateadded" assign="new_listings" featured="n"}
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
External listings module - show price and owner JWB TemplateCodes 6 03-10-2010 03:30 PM
Feature Listings Horizontal Limit to Owner business Templates, HTML, CSS, and Design Help 6 12-08-2009 10:24 AM
View All Listings of Owner nagrap2 Technical Support 3 02-09-2009 03:46 PM
Query Unregistered Pre Sales Questions 1 09-11-2006 02:00 PM


All times are GMT -4. The time now is 06:48 AM.


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