Parent, sibling viewer.

4 posts by 2 authors in: Forums > CMS Builder
Last Post: August 12, 2009   (RSS)

By rconring - August 10, 2009

Problem:
I have a page with 4 columns to display groups of links. I have 2 tables
web_categories - Contains group name, display column (1,2,3,or 4) in order to be able to group by column and sorted by globalSortOrder within column viewer.
--web_links - Contains group (num, from group list), display text, rollover text, URL, target frame ...etc in order to construct links to external and internal URLs and be sorted within the group using globalSortOrder.

I have it working now using only one file (web_links as categories) and a viewer for each column. Works fine except I do
not have the ability to quickly move an entire group to another column. Using 2 files, I can simply change the column number in the parent file and the siblings will follow.

My problem is that I don't quite know enough PHP to create the viewers to read from the parent and display the group
name, then display the group of siblings.

Any advice would be appreciated.
Ron Conring
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987

Re: [rconring] Parent, sibling viewer.

By Chris - August 11, 2009

Hi rconring,

I'm having trouble figuring out exactly what you want to accomplish. Can you post any examples of what you have and/or want?
All the best,
Chris

Re: [rconring] Parent, sibling viewer.

By rconring - August 12, 2009

Never mind ... I found the answer on page 35 of Jerry Kornbluth's CMS COOKBOOK.
The solution is nested getRecord lists. Place the primary list in the header and the secondary list within the foreach loop in the body. Therefore, the column placement is controled solely by the primary table.

Thanks Jerry!
Ron Conring
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987