One of the problems I have is that the database (which is Access) is already being used, so I can't make changes to it.
I am thinking of dividing the work into small pieces, using individual tags to retrieve the Title, Section, etc. Stephen Adams Forvus 53 Clapham Common South Side, London, SW4 9BX http://www.forvus.co.uk -----Original Message----- From: Stephen Moretti (cfmaster) [mailto:[EMAIL PROTECTED] Sent: 21 July 2004 14:57 To: [EMAIL PROTECTED] Subject: Re: [ cf-dev ] using custom tag CF_QueryToStruct Stephen Adams wrote: >It's a bit tricky to explain, but I am trying to build a small content >management system, which retrieves a top layer of information related to a record in the database (e.g. ID, title, sectionname, filename). Then I am checking again the same database table to look for any "child" elements to the first "parent" element, again retrieving the same info (ID, title, sectionname, filename) and then I am checking again to see if there are any child elements to that child element, if there are then display them, if not then don't. > >The problem I am having is layout, I want to be able to have a fairly >flexible layout so that content can be displayed like this: > > You'll be wanting to look at the nested set model for your database structure. There's a good article here. http://searchdatabase.techtarget.com/tip/1,289483,sid13_gci537290,00.html (you need to register, but its free and pretty good resource too) I have a bad habit of combining the adjacency model and the nest set model and giving each record a parent id, as well as a left/right position. Another method I've used is to give each "menu" item a dot delimited display order, so top level items only have one number in their display order, which denoted their position on the top level, from 1 to n. Second level items have two numbers, the first being the display order of the parent and the second being its position on the second level, so : About - 1 Contact - 1.1 Board - 1.1.1 Plebs - 1.1.2 Map - 1.2 Products - 2 groupA - 2.1 groupB - 2.2 and so on.... Don't know whether either of these will be a help or a hinderance, but I would definately suggest looking at that article on nested sets. Its a little confusing to start with but once you have it it works well. Stephen -- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ CFDeveloper Sponsors and contributors:- *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com* *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com* To unsubscribe, e-mail: [EMAIL PROTECTED] ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ -- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ CFDeveloper Sponsors and contributors:- *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com* *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com* To unsubscribe, e-mail: [EMAIL PROTECTED]
