Big Question

5 posts by 2 authors in: Forums > CMS Builder
Last Post: March 31, 2010   (RSS)

By DanMaitland - March 29, 2010

Ok I have a big question. So I am creating this website for a wine distributor. They will have one multi section for wines where they will enter in all their wines with the info that goes along with it like Name, description, year, vintage, price, PRODUCER etc...

Then they will have another multi section for PRODUCERS with all the info required like Name, description, region, logo etc.... Now they won't have a detail page for the wine just a list and the Producers section will have both a list of producers and their respective details page. Now the big question is, when entering in a new wine is there a way that the user can select a producer from some sort of list so that on the PRODUCERS details page along with all the PRODUCER'S info we can display all the wines that are linked to that specific PRODUCER.

I really hope that I am being clear enough. I have a decent grasp of CMS Builder but am by no means a PHP master. Is there a semi simple way of doing this or some sort of work around. I have already used Chris's elatedlookup plugin and have acheived 90% of what I needed it to do but was wondering if there is another way to get this to work or if Chris's plugin can help me with this project.

Re: [Jason] Big Question

By DanMaitland - March 31, 2010

Jason,
Are you sure there isn't supposed to be an if statement in there somewhere? From the looks of the code I think that will just call all wines and not just the ones associated through the list. I could definitely be wrong but it just doesn't look right for some reason.

Re: [Dan Maitland] Big Question

By Jason - March 31, 2010

Hi Dan,

This code should work. You would put it right where you want the wines of a producer listed. The line: " 'where' => 'producer='.$record['num'] " means that it will only take wine records from the database that have a producer field that is the same as the current producer that is being printed out.

Give it a try and let me know if there are any problems.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Big Question

By DanMaitland - March 31, 2010

KILLER!! I'll try it out and let you know. Thanks J.