beta_lookupRelatedFields HELP!!!

6 posts by 3 authors in: Forums > CMS Builder
Last Post: March 30, 2010   (RSS)

By DanMaitland - March 28, 2010

Chris or Dave,
I won't go into to much detail on this so hear it is. I followed this post to the T to try and get the LookupRelatedFields plugin to work

http://www.interactivetools.com/forum/gforum.cgi?post=78897;search_string=equinox;t=search_engine#78897

and it sort of does, but I get this crazy error and I just don't know why. I did it exactly as explained by installing the plug in and then by entering in all the correct info but it still gives me this funky error. I'm sure that I am close and am probably missing something small but I just can't figure it out. I need this to work as I have to apply it to the next site I have lined up.

In short what I am trying to do is this: I have a real estate site that has a multi record for agents and another multi record for property listings. in the listings section editor I created a list field that pulls the names/titles from the agents table(works fine) but when I tried to follow the post on this to get the fields from the agents table to show up in the listing details page I just keep getting this funky error (you can see the error if you follow the link below:

http://www.gselection.com/dev/listing.php?104-Rue-Bellevue-4

I really hope that you guys can help me out with this. If there is another way to associate a specific agent to a specific property that would be fine as well but this has to work one way or another and it would be crazy to think it cannot be done. Thanks in advance guys.

Re: [Dan Maitland] beta_lookupRelatedFields HELP!!!

By DanMaitland - March 28, 2010

Ok guys, after messing around with every possible variable I managed to figure it out. It took a while but at least i learned something. Thanks anyways.

Re: [Dan Maitland] beta_lookupRelatedFields HELP!!!

By DanMaitland - March 29, 2010

Ok so I might have spoken to soon. Yes I got it to work but I am only able to pull text and not images. Is there a certain way or different way that I have to set up the code to pull the uploads from another section?

Re: [Donna] beta_lookupRelatedFields HELP!!!

By DanMaitland - March 29, 2010

Well like I said I think I spoke to soon. I managed to be able to pull any type of text from another section but for whatever reason I am not able to pull any images. Is it because it's an array? There must be a way to pull the images as well.

In the end I just want to be able to display an agents info it that listing is his tha'ts it.

I don't care how it's done as long as there is a way to do it. The relatedlookup plugin is great but if it can't pull images as well then it's quite limited and I will then have to figure out another way. Any suggestions would be great.

Re: [Dan Maitland] beta_lookupRelatedFields HELP!!!

By Chris - March 30, 2010

Hi Dan,

I think the related lookup plugin is probably overkill for displaying an agent's listings on an agent's detail page.

You can do something like this instead:

list($agentRecords, ) = getRecords(array(
'tableName' => 'agent',
'where' => whereRecordNumberInUrl(1),
));
$agentRecord = @$agentRecords[0];

if (!$agentRecord) {
header("HTTP/1.0 404 Not Found");
print "Record not found!";
exit;
}

list($listingRecords, ) = getRecords(array(
'tableName' => 'listing',
'where' => "agent = '" . $agentRecord['num'] . "'",
));


Does that help? Please let me know if you have any questions.
All the best,
Chris