Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Create an entire web page using cffile

Contributor ,
Mar 24, 2009 Mar 24, 2009
I would like to create an entire web page using cffile..

it seems that the output attribute is where you put the content like:

output="this is a test."

Q: so how do you add the full .htm content inside .... output=""
... where there will be lots of other double quotes?

(if it involves 'escaping' characters - then I'll need some help with that.)

Also : is it possible that the content could be some data combined with an cfinclude - i get errors when i try this...

1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advisor , Mar 24, 2009 Mar 24, 2009
Translate
Explorer ,
Mar 24, 2009 Mar 24, 2009
Out of curiosity, why would you want to do this? It seems as if creating a page via industry standards would be much simpler.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 24, 2009 Mar 24, 2009
Hi rmorgan,

I have stuff stored in a data base and want to create real static full .htm pages from that data rather than to display in by dynamically loading cf data into 1 master page.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 24, 2009 Mar 24, 2009
so if I have 50 records of data - I would like to make 50 hard coded static pages from them.

Q How do I get this happening with all the html coding characters like: " - < - > etc... - they all seem to produce errors...
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 24, 2009 Mar 24, 2009
Well, I dont think I fully understand your intentions or goals are. However, from what I gather so far, you could output the data into pdf files. But like I said I dont understand what your trying to achieve. As far as the errors with <..etc, if they are included and you are trying to produce results those characters very well could cause problems when you are trying to do something that they were not intended to do.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Mar 24, 2009 Mar 24, 2009
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 24, 2009 Mar 24, 2009
LATEST
JR "Bob" Dobbs & Kronin555

cfsavecontent worked perfectly as you described it!!!

Now, using cfsavecontent along with cffile, I can print hard copy static web pages like I want to!

Thanks soooooo much!


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 24, 2009 Mar 24, 2009
<cfsavecontent variable="pageContent">
<html>
<head>
...
</head>
<body>
...
</body>
</html>
</cfsavecontent>

<cffile action="write" output="#pageContent#" ...>

Edit: JR beat me to it.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources