beta_lookupRelatedFields HELP!!!

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

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: [Dan Maitland] beta_lookupRelatedFields HELP!!!

By Donna - March 29, 2010

Hey Dan -- glad to hear you got that figured out! Let us know if you have any other problems. :)
Donna

--
support@interactivetools.com

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