Copy link to clipboard
Copied
Is there a way to do this?
I'm starting a Website redesign and want to ditch the current nav scheme, which involves many includes, all static.
Is there a way to use a SQL Server database and create a dynamic navigation system? Breadcrumbs would be nice,
but I think I've come across ways of doing that.
I've Googled this question, and the best hit was from -- guess who? -- Ben Forta.
http://forta.com/cf/using/list.cfm?categ_id=21
JDS Uniphase Inc. JDSU's whole site (navigation and content) is being dynamically spun using CFM.
Contact: Rick Ranger
Copy link to clipboard
Copied
I just found this, which might be getting closer to what would work in this case.
http://www.gowestwebdesign.com/demos/cf-list-menu/index.cfm
Then - much like the popular javascript-based 'current page' menus - we look at the value of the link url, and the current page url (cgi.SCRIPT_NAME) - if they are the same, we have a winner. One other thing I find myself commonly wanting is a bit of special css on the first or last item in a list, so the code also assigns IDs to those links.
Copy link to clipboard
Copied
Is there a way to do this?
I'm starting a Website redesign and want to ditch the current nav scheme, which involves many includes, all static.
Of course there is.
What kind of answer were you expecting to a question like that? It's very broad.
I think it's probably best to - initially - continue what you're doing and google-up what other people have done (or, heck, just look at the source mark-up of websites that do the sort of thing you want to achieve), and also get up to speed with CF, because the question itself belays a certain degree of naivety of the toolset in front of you.
Once you decide on and approach and get underway with it and you find some more focussed questions, ask 'em.
--
Adam
Copy link to clipboard
Copied
Adam, thank you for encouraging me to continue researching this subject. And you're absolutely right! I'm inexperienced with CF 9. The source mark-up I didn't think would help because I wouldn't see the server-side scripting, and that's assuming I could even find Websites that use CF for their dynamic nav. However, I'm persistent and eager to delve into CF 9.
Copy link to clipboard
Copied
What I mean is there's just no trick to it at all. CF's just a programming language, so one can do anything one likes with it. My advice to look at the mark-up is to simply see how the end result is implemented, and then one just uses CF to automate the repetetive bits.
So if you want breadcrumbs, for example, you'll see from the markup that these are often just an ordered list, with some CSS to make 'em appear on one line, etc. So you get your page ancestors (and how one does this depends on what your page data is implemented / structured), and loop over 'em, making an <ol>.
--
Adam