Web Page from DB, CFINCLUDE does not work

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Web Page from DB, CFINCLUDE does not work

    I am working on a dynamically generated Web site with pages that are stored in
    a database. When I display a page from the database, the CFINCLUDE tag is not
    processed. I see the actual cfinclude tag in the rendered document, not the
    text that should be included. I don't know if other CF tags will work or not.
    This was the first I noticed not working, and I wanted to try to find an answer
    before spending more time on the project. Thanks, Jim

    jaymes Guest

  2. Similar Questions and Discussions

    1. CFINCLUDE not working
      Hi, I am trying something I thought was simple: <HTML> <CFINCLUDE TEMPLATE="LaserImaging_Stylesheet.cfm"> <HEAD> <TITLE>Home Page</TITLE>...
    2. cfinclude nav menus
      The drop-down menus in my site are contained in a cfinclude file so I only have to edit one file to make site wide menu changes. Can search engines...
    3. SSL with CFINCLUDE
      I have plenty of CF experience, but am utililzing SSL for the first time. I was told of course that all pages must reference with https// and that...
    4. Swaping DIV that contain CFinclude
      Hi this following code <div class="ContentAreaDiv"> <p class="pageHeader">Kingdom Stages Rally 2003</p> <p class="pageSubHeader">Results</p> ...
    5. CFINCLUDE
      I'm not sure what your problem is. CFINCLUDES can be nested both on the same page and in sub pages; however, it can get pesky if the overall HTML...
  3. #2

    Default Re: Web Page from DB, CFINCLUDE does not work

    Are you saving the page as a .cfm page?

    --
    Ken Ford
    PVII Support Team
    [url]http://www.projectseven.com[/url]
    Team Macromedia Volunteer - Dreamweaver
    Certified Dreamweaver MX 2004 Developer


    "jaymes" <webforumsuser@macromedia.com> wrote in message news:d1mhvi$3g5$1@forums.macromedia.com...
    >I am working on a dynamically generated Web site with pages that are stored in
    > a database. When I display a page from the database, the CFINCLUDE tag is not
    > processed. I see the actual cfinclude tag in the rendered document, not the
    > text that should be included. I don't know if other CF tags will work or not.
    > This was the first I noticed not working, and I wanted to try to find an answer
    > before spending more time on the project. Thanks, Jim
    >

    Ken Ford - *TMM* & PVII Guest

  4. #3

    Default Re: Web Page from DB, CFINCLUDE does not work

    Yes, the stub page is a .cfm page. It includes this query and display:
    <cfquery datasource='myCMS' name='getPage'> select PageText from
    Pages where pagePath='#CGI.Script_Name#' </cfquery> <cfoutput
    query='getPage'> #PageText# </cfoutput> The text is displayed, so
    the page record is retrieved correctly. But one of the lines in the retrieved
    text is a CFINCLUDE statement, and that statement shows up as part of the page
    (when you view page source), it does not actually do the include. Thanks for
    assistance, Jim

    jaymes Guest

  5. #4

    Default Re: Web Page from DB, CFINCLUDE does not work

    None of the CFML tags will be processed that way. The only way I can see that
    working is if you write the results of the query to the file system using
    CFFILE, and then include it with CFINCLUDE.

    Is there some reason it is better to store these files in a db instead of the
    file system?

    JR

    jonwrob Guest

  6. #5

    Default Re: Web Page from DB, CFINCLUDE does not work

    We want to use a DB to manage documents, archive documents, assign expiration
    dates, and to allow in-browser editing using ActiveEdit. If we can't store CFM
    pages in a database then this is a serious problem. Any other ideas out
    there? Thanks, Jim

    jaymes Guest

  7. #6

    Default Re: Web Page from DB, CFINCLUDE does not work

    i don't believe you're actually supposed to store the pages themselves but the
    content on them. So for instance, you have an article that you want to expire
    on such and such a day. so your db would be set up like this: table:articles
    cell: article_id cell: article_content cell: article_author cell: expire_date
    etc. Then on your cf page you would call that article. The cfincludes, i don't
    know what they are for, but you would have to store in a folder in your site.
    On example would be that you would have several templates (designs for the
    pages, users, whatever) and the cfinclude would query the db and display that
    article in that particular layout. You would then use forms or in your case
    active edit to create those article. Images included in those articles would be
    stored in the db as well so that when you call the data it appears as it would.
    This is all obviously a guess since i am not familiar with active edit other
    than what I could see on the web. And I am unfamiliar with what you are trying
    to do. you might just want to try to find a good cf content management system
    to do all the work for you.

    jjsand28 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139