Table layout query

6 posts by 4 authors in: Forums > CMS Builder
Last Post: October 15, 2012   (RSS)

Re: [pothompson] Table layout query

Hi pothompson,

If I'm understanding you correctly, it will help think of your tables and viewers as separate concepts.

There are many ways to organize this, but one approach might be to create a total of 3 multi-record editors, "Menus", "Menu Sections" and "Items". The first 2 have only one text field each, called "category".

The "Items" editor is where you'd list the items available for purchase, and that would have multiple fields.

In the "Menus" editor, create separate records for alacarte, lunch, dinner, etc.

In the "Menu Sections" editor, create separate records for mains, starters, etc.

In the "Items" editor, in addition to all of the information fields for title, description, price, etc., add 2 pull down list fields called Menu and Menu Section, that get their data from the other 2 editors that you created.

That way the restaurant can add new items to any category without needing your help.

You could use the free "create records here" plugin to help in placement of new item records, but The restaurant would also probably have to drag some items to the appropriate place in their menu.

In your viewers you can use a combination of if statements and category groupings to list the Items under the appropriate headings.

Styling, is of course a completely separate topic.

There are a number of recipes in my CMSB Cookbook www.thecmsbcookbook.com that go deeper into these concepts and on ways to separate listings into groupings based on categories.

Hope that gets you started.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [pothompson] Table layout query

I agree that the the best way to set up the menu system is to have separate sections for the menus and menu categories and to have one section which contains all of the menu items.

To make managing and sorting it easier I would set up an advanced search option so that it is easy to filter out each menu and menu category in menu items.

If you go to modify the menu items section in the section editor there is a tab called searching. If you added the two fields for menu and menu category your customer can easily filter them using the advanced search in the menu items section. This should make managing the menu items a lot easier.

I hope that made sense. Let me know if you need any help setting this up.

Thanks
Greg Thomas







PHP Programmer - interactivetools.com

Re: [greg] Table layout query

Thanks for the reply, this is essentially how I've ended up doing it.

To make it slightly easier, I added a related records field to the menu section so within 'Evening menu -> First courses' I can see all of the menu items and can add, update, etc.

It would be really useful to be able to use the drag and drop in here as well, are there any plans to introduce drag and drop ordering in related records?

Re: [pothompson] Table layout query

By Jason - October 15, 2012

Hi,

The latest version of CMS Builder does support dragSortOrdering for related records, but you have to manually set this in the data/setting.dat file.

If you open this file and change this line:
allowRelatedRecordsDragSorting = 0

to
allowRelatedRecordsDragSorting = 1

Then go back into CMS Builder, you should have drag sort functionality inside the relatedRecords box.

Hope this helps
---------------------------------------------------
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] Table layout query

That's great, thanks Jason.