Just not understanding how to set up Category menus

44 posts by 5 authors in: Forums > CMS Builder
Last Post: September 22, 2009   (RSS)

By sublmnl - August 31, 2009

BTW - it is in depth help like this that has us purchasing the CMS over and over and over... Be sure to tell Dave and the gang you guys are doing a great job.

By Dave - September 2, 2009

Thanks! :) Glad we could help!
Dave Edis - Senior Developer
interactivetools.com

Re: [chris] Just not understanding how to set up Category menus

By Codee - September 4, 2009

Hi Chris,
Finally getting to work on this again...Okay...what you wrote works for what you wrote...I think I either misunderstood or wasn't clear so let me explain what I need in more detail:

I want to list Inventory records. Inside those records I have a field called "Make" or "Manufacturer". When I'm adding an inventory record for an item for sale and click on "Inventory" to start the record in CMSB, then when I get to the Manufacturer's field I want that to be a dropdown (obviously) list of manufacturer's...then dependent upon the manufacturer, I need a sublist of models for that manufacturer. Fill in the rest of the fields like description, title, content, etc. and save.

THEN, I need the visual menus that visitors get to use in their browser to reflect what is in the manufacturer's fields and then the corresponding models...and be able to click on them to get the inventory records that have those.

Does that make more sense?

Unless I'm missing something obvious, what you offered doesn't quite provide that. Please help me understand better.

Thanks,

Terry[:(]

Re: [equinox69] Just not understanding how to set up Category menus

By Chris - September 5, 2009

Hi equinox69,

I must have misunderstood your original question.

Here's a step by step for you:

1) Create three Multi Record sections: "Inventory", "Manufacturer", and "Model"

2) Modify the Model section and add a "manufacturer" field:

Field Label: Manufacturer
Field Name: manufacturer
Field Type: list

Field Options:
Display As: pulldown
List Options: Get options from database (advanced)
Section Tablename: manufacturers
Use this field for option values: num
Use this field for option labels: title


3) Modify the Inventory section and add a "manufacturer" field with exactly the same settings as above

4) Also, add another field to the Inventory section called "model":

Field Label: Model
Field Name: model
Field Type: list

Field Options:
Display As: pulldown
List Options: Get options from MySQL query (advanced)
Advanced Filter: Refresh list when this field changes: manufacturer


And paste this into the box below "Get options from MySQL query":

SELECT num, title
FROM `<?php echo $TABLE_PREFIX ?>model`
WHERE manufacturer = '<?php echo $ESCAPED_FILTER_VALUE ?>'


5) Test it! Create at least two Manufacturers and at least one Model for each of them, then create an Inventory record. When you select a manufacturer, the options in the model pulldown will change dynamically.

I hope this helps. Please let us know if you have any questions or comments.
All the best,
Chris

Re: [equinox69] Just not understanding how to set up Category menus

By Chris - September 7, 2009

Hi equinox69,

Can you explain how you'd show "equipment types" in your menu?
All the best,
Chris

Re: [chris] Just not understanding how to set up Category menus

By Codee - September 7, 2009

Hi Chris,
Thanks...and thanks for replying so quickly too!

Okay, "Equipment Type" is also a field in the Inventory section. This particular site is for a variety equipment and vehicle site so there are different types of equipment that get listed. For example, equipment types can be "Forestry", "Fire", "Paving" or "Service Truck". Some equipment can be cross-type, so there's a multi-pulldown on that field. A "service truck" can also be a "water vehicle" or "fire" truck.

So, on the visitors menu, akin to the way manufacturers work there would be a button called "Equipment Type" (corresponding to the field under Inventory Record) and then there may be a few dozen types of equipment that should list.

Does that make sense?
Terry

Re: [equinox69] Just not understanding how to set up Category menus

By Chris - September 7, 2009

Hi Terry,

So your visitors will be searching either by Manufacturer/Model or by Equipment Type?
All the best,
Chris

Re: [chris] Just not understanding how to set up Category menus

By Codee - September 7, 2009

From the menus and dropdown menus, yes.

Re: [equinox69] Just not understanding how to set up Category menus

By Chris - September 7, 2009

Hi Terry,

I'm going to do some research on the best way to approach this and get back to you tomorrow. Stay tuned. :)
All the best,
Chris