+ Reply to Thread
Results 1 to 9 of 9

Thread: Number of listing per class

  1. #1
    Join Date
    Oct 2006
    Posts
    6

    Default Number of listing per class

    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

  2. #2
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    40
    Posts
    9,807

    Default Re: Number of listing per class

    Is there any way to call/use a template tag to display the number of listings in a specific pclass?
    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?

  3. #3
    Join Date
    Oct 2006
    Posts
    6

    Default Re: Number of listing per class

    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..

  4. #4
    Join Date
    Feb 2004
    Posts
    1,069

    Default Re: Number of listing per class

    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.
    Attached Files

  5. #5
    Join Date
    Oct 2006
    Posts
    6

    Default Re: Number of listing per class

    Hi -- Thank-you for this addon! I appreciate It..
    I got it working -- :o)

  6. #6
    Join Date
    Feb 2004
    Posts
    1,069

    Default Re: Number of listing per class

    Share what you did.
    I did this one really quick and only tested on 2.3.4

  7. #7
    Join Date
    Oct 2006
    Posts
    6

    Default Re: Number of listing per class

    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..

  8. #8
    Join Date
    Feb 2004
    Posts
    1,069

    Default Re: Number of listing per class

    most everything is possible.
    PM me with the website and more information. I'll look into this.

  9. #9
    Join Date
    Nov 2008
    Posts
    43

    Default Re: Number of listing per class

    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.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts