Is there any way to call/use a template tag to display the number of listings in a specific pclass?
For example on the main home page have a table with:
home 25 listings
rental 10 listings
commercial 5 listings
Is there any way to call/use a template tag to display the number of listings in a specific pclass?
For example on the main home page have a table with:
home 25 listings
rental 10 listings
commercial 5 listings
There aren't any template tags for this. It would require an addon. I could be wrong but I thought there was one somewhere. Did you try using the search function?Is there any way to call/use a template tag to display the number of listings in a specific pclass?
Hi pbflash..
yes i searched again and found out Andrea - was trying to do this as well re: http://support.open-realty.org/showt...ings+per+class
but no solution there either - it requires an add on - thank-you for the direction.. unfortunately - i can't create this with my limited php knowledge..
Here is something I put together after reading the post.
unzip in your addons folder.
put {addon_countclasses_link} where you want the link to appear in your template.
Hi -- Thank-you for this addon! I appreciate It..
I got it working -- :o)
Share what you did.
I did this one really quick and only tested on 2.3.4
I am going to try and customize this to fit into the site's template - then show you how it turned out - i just tested it really quick as well on the latest release 2.3.4 and yes it's showing the number of listings per class - well done! i'm going to try and build my template around the page you generated:
index.php?action=addon_countclasses_showpage1
I think it will work - i studied the code you provided quite throughly and i follow the logic - i just don't know the language (php) - anyway - you have the class counts showing up in a sequence as data is pulled from the database..
re:
$display .= "<br><strong>$CLASS_NAME</strong> $class_count listings";
$recordSet->MoveNext();
Is there anyway to have this output defined as separate template tag variables --
ie: {class1_count}, {class2_count}
and just plug these into the html template where ever i like?
I am styling the 'number of listing per class" into a table with each property class in thier own table cell - i think i can hack it out with your script - but html template tags of each class and count would simplify this and make this solution highly customizable for all..
but if this solution is tedious - don't code it - i understand..
most everything is possible.
PM me with the website and more information. I'll look into this.
hi
is there possible to get the pclass and numbers to be displayed as url, so when the visitor see the counts of listings on a pclass, can click on it.
Bookmarks