photo

Wayne McGowan

shared this idea
3 years ago

Employees Involved

photo

PIV Support

Admin

Statistics

5
Comments
508
Views

Relates to

Share

1
votes

Is there a way to get the class id on the search results page

I am using Open Realty 3.2.9 and want to show the listing "pclass id" on the search results page for each property.

Like

prop class: 1

prop class: 2

I see no tag for it, I only see for the class name "listing_pclass"

Is there a tag to pull the actual class ID for each listing on the search results page?

Thank you

Under Consideration
+1 I like this idea
Add Comment

Comments (5)

photo Employee
1

There is presently no tag available I can see to do that:

http://docs.transparent-tech.com/open-realty/latest/searchresultstemplatetags0.html

It should be pretty easy to do with an add-on.

photo Employee
1

I sent this in as a feature request, and have changed your thread to an Idea accordingly.

photo
1

Thank you so much

I was very surprise that this could not be done via a tag.

I had need to use it for a design I was doing and I was sure I was going to find a tag for it.

Thanks for submitting as a feature request.

PS

If there is someone out there with a solution already done I would greatly appreciate it.

photo Employee
1

It's not a question of if it could be done, it was just never done. Lack of interest or necessity would be my guess. Tags must first exist and have a handler in OR's core and some kind of functionality designed behind that before you can use them, unless you make your own tags via the add-on system.

This would be fairly simple to do using the listing__read API method.

http://docs.transparent-tech.com/open-realty/latest/listingapi.html

  1. global $api;
  2. $result = $api->load_local_api('listing__read',array('
  3. listing_id'=>$listing_id,
  4. 'fields'=>array('listingsdb_pclass_id')
  5. ));
  6. if(!$api_result['error']){
  7. $pclass_id = $api_result['listing']['listingsdb_pclass_id'];
  8. }
  9. return $pclass_id; //or echo to test

photo
1

I did an addon already but I did not use the API method so I will look into this method.

Thank you

Leave Comment

photo

Attach files...

The file must be a jpg, gif, png, bmp, ico, pdf, doc, rtf, txt, zip or rar no more than 20M