MySQL
  Home arrow MySQL arrow Page 8 - Building a Simple ColdFusion Content M...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MYSQL

Building a Simple ColdFusion Content Management System with MySQL
By: Charles Kaufmann
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 45
    2004-08-11

    Table of Contents:
  • Building a Simple ColdFusion Content Management System with MySQL
  • Starting With MySQL
  • The Page and how to Update/Modify and Delete
  • Add/Modify Form
  • Action
  • Breadcrumb List
  • Side Menu
  • Site Map

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Building a Simple ColdFusion Content Management System with MySQL - Site Map


    (Page 8 of 8 )

    Site maps are useful to show people your entire site at a glance so they can more easily find what they are looking for. Another added bonus of a site map is it helps search engines spider your site. Here is the code.

    1   <cfquery name="sitemap" datasource="#variables.data#">
    2    select *
    3    From tblpages
    4    Where status='A'
    5    Order by hierarchy
    6   </cfquery>
    7    <cfoutput query="sitemap">
    8    <cfloop from="2"
    9  to="#listlen(menusub.hierarchy, "~")#"
    10  index="i"> - </cfloop>
    11  <a target="_self" href="page.cfm?id=#menusub.id#"
    12   title="#title#">#title#</a>
    13    : (#dateformat(updatedate, "M/D/YYYY")#)<br>
    14 </cfoutput>

    Start by creating a new page called Sitemap.cfm or whatever you want to call it. Place the above code on it. What this will give you is your entire web site laid out in a hierarchical format with the last date the page was updated. Lets walk through the code quickly. Most of it should look familiar, because it is a very stripped down version of the side menu. This one includes all of the parents and children. The query is performed on all the active records and CFOUTPUT on line 7. I am using the same CFLOOP to put the dashes before the links. Lines 11 through 13 put the page links and the revision date on the page. That is it. Very simple because you have already done all the work on the add a new page action (populated the hierarchy variable).

    Conclusion

    We have walked through the creation of a simple but powerful content management system. We have leveraged the power of building the pages with a hierarchical structure which allows us to dynamically build out a breadcrumb list, a side menu and also a site map page. This was done to minimize the amount of time it takes to maintain and update a web site. This was not meant to be an extensive build out of a content management system, but to provide you with the core of what is needed. In order to put this on a public server, you still have to provide a way to authenticate the administrator so that you can lock all of the administrative functions from the public.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Very good explanation on building table in mySQL, I could do with more help building...
       · The code is very unclear. The author jumps from one page to another without any...
       · I disagree with the previous poster. Yes, you must be familiar with cfoldfusion to...
     

       

    MYSQL ARTICLES

    - MySQL Table Prefix Changer Tool in PHP
    - Using the SIGNAL Statement for Error Handling
    - Error Handling Examples
    - Error Handling
    - Completing a Search Engine with MySQL and PH...
    - Paginating Result Sets for a Search Engine B...
    - Building a Search Engine with MySQL and PHP 5
    - Using Boolean Operators for Full Text and Bo...
    - PHP, MySQL and the PEAR Database
    - Working with PHP and MySQL
    - Getting PHP to Talk to MySQL
    - Creating an RSS Reader: the Reader
    - MySQL Security Overview
    - Creating the Admin Script for a PHP/MySQL Bl...
    - Creating the Blog Script for a PHP/MySQL Blo...

    BlackBerry VTS




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway