Table layout query
6 posts by 4 authors in: Forums > CMS Builder
Last Post: October 15, 2012 (RSS)
I'm trying to achieve something in CMS Builder but not sure it's possible.
The website I'm working on is for a restaurant and the restaurant have a number of menus from which to order food.
Each menu, is then divided into sections (starters, mains, etc.)
The most user-friendly way I can think to do this would be to have different sections in the CMS set-up for each menu but we'd like to offer the restaurant owner the ability to create new menus going forward without coming to us.
I can create a section called 'Menus' which might have records for 'A la carte', 'Lunchtime', etc.
Then a section called 'Menu sections' which could have records like 'A la carte - Starters', 'A la carte - mains', 'Lunch - starters', etc.
This would allow the restaurant owner to create new menus but the only way I can see that they can then add menu items would be to have one CMS table for menu items where the menu name and section is specified.
This is OK but they would need the ability to drag and drop to re-order items and this would mean all menu items from all menus would appear under the same CMS section and each time a new one was added, it would need to be dragged into the correct place in the correct menu.
Sorry this is so long-winded but is there a different way to achieve this?
The website I'm working on is for a restaurant and the restaurant have a number of menus from which to order food.
Each menu, is then divided into sections (starters, mains, etc.)
The most user-friendly way I can think to do this would be to have different sections in the CMS set-up for each menu but we'd like to offer the restaurant owner the ability to create new menus going forward without coming to us.
I can create a section called 'Menus' which might have records for 'A la carte', 'Lunchtime', etc.
Then a section called 'Menu sections' which could have records like 'A la carte - Starters', 'A la carte - mains', 'Lunch - starters', etc.
This would allow the restaurant owner to create new menus but the only way I can see that they can then add menu items would be to have one CMS table for menu items where the menu name and section is specified.
This is OK but they would need the ability to drag and drop to re-order items and this would mean all menu items from all menus would appear under the same CMS section and each time a new one was added, it would need to be dragged into the correct place in the correct menu.
Sorry this is so long-winded but is there a different way to achieve this?
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
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
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
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
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?
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
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/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/