EasyCFM.COM ColdFusion Forums / Coding Help! / HTML IN CFM

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: HTML IN CFM -- page: 1 2

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

cybercompros
04-27-2004 @ 4:00 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 320
Joined: Feb 2004

I was wondering if there was a way to do html in coldfusion that is similer to php ($content) I know php does it in standard form to.  But I was just curious if there was a way to do that.

Thank You,
Jordon Bedwell
Cybercom Pros
------------------------------
Planning Is Not Good In Design, You Must Have A Free Spirit!
------------------------------

Texas Design! Texas Pride!

wWw.JoRdOnBeDwElL.CoM

Webmaster
04-27-2004 @ 4:35 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4533
Joined: Jan 2002

ok, you are gonna have to rephrase your question...

What kind of HTML, what are you trying to achieve?

Thanks,
Pablo Varando
Team Macromedia Member
=====================================================

cybercompros
04-27-2004 @ 5:00 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 320
Joined: Feb 2004

I want to be able to program all my html (html 4, tables, xhtml, dhtml) all using cold fusion.

Here is an example in php:

if (eregi("support.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

$content .= '<!-- BEGIN Help Center Live Code, © Jordon bedwell (Cybercom Pros Professional Development Team (  Demon Team).) 2004 -->';

$content .= '<a href='javascript:initiate_accept()'>';

$content .= '<img src='http://coldfusionzone.com/support/inc/skins/default/images/lh/initiate.gif' border='0'></a>';

$content .= '<br>';

Thank You,
Jordon Bedwell
Cybercom Pros
------------------------------
Planning Is Not Good In Design, You Must Have A Free Spirit!
------------------------------

Texas Design! Texas Pride!

wWw.JoRdOnBeDwElL.CoM

This message was edited by cybercompros on 4-27-04 @ 5:00 PM

CJ
04-27-2004 @ 5:02 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4262
Joined: Oct 2002

<cfscript>
     writeOutput('<table border="1">');
     writeOutput('<tr><td>');
     writeOutput('why would you want to do this?');
     writeOutput('</td></tr></table>');
</cfscript>



-CJ-
@ #coldfusion/DALNet
http://charlie.griefer.com

cybercompros
04-27-2004 @ 5:05 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 320
Joined: Feb 2004

Im doing this so I can create a graphical templated system.  Similer to Php Nuke.  Where people can define how the template will layout, using a definition page.

Thank You,
Jordon Bedwell
Cybercom Pros
------------------------------
Planning Is Not Good In Design, You Must Have A Free Spirit!
------------------------------

Texas Design! Texas Pride!

wWw.JoRdOnBeDwElL.CoM

CJ
04-27-2004 @ 5:05 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4262
Joined: Oct 2002

oh, you just want to save HTML into CF vars?

<cfscript>
     content = '<!-- BEGIN Help Center Live Code -->';
     content = content & '<a href="javascript:initiate_accept();">';
     content = content & '<img src="http://www.coldfusionzone.com/support/inc/skins/default/images/lh/initiate.gif" border="0"></a>';
</cfscript>

<cfoutput>
     #content#
</cfoutput>


-CJ-
@ #coldfusion/DALNet
http://charlie.griefer.com

This message was edited by CJ on 4-27-04 @ 5:05 PM

cybercompros
04-27-2004 @ 5:16 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 320
Joined: Feb 2004

Is there a way, i can tell the template not to load the page if its not loaded from index.cfm? or Fuse.cfm?, or FuseAction.cfm?

Thank You,
Jordon Bedwell
Cybercom Pros
------------------------------
Planning Is Not Good In Design, You Must Have A Free Spirit!
------------------------------

Texas Design! Texas Pride!

wWw.JoRdOnBeDwElL.CoM

CJ
04-27-2004 @ 6:37 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4262
Joined: Oct 2002

<cfif cgi.http_referer is not "blah.html">
     <cfabort>
</cfif>

-CJ-
@ #coldfusion/DALNet
http://charlie.griefer.com

cybercompros
04-27-2004 @ 10:14 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 320
Joined: Feb 2004

When I try to do that It only shows the first line!

CODE (META.CFM)


<!----------------------------------------------------------------------------
##############################################################################
###                           CFZ - NUKE                                   ###
###                    Created By Jordon Bedwell                           ###
###                                                                               ###
###                                                                                             ###
###                   Application Name: CFZ - NUKE                                 ###
###                                                                                             ###
###                     Template Name: Meta.CFM                            ###
##############################################################################
----------------------------------------------------------------------------->

<cfscript>
$meta = ('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
$meta = ('<meta name="description" content="Professional Design, And Development Firm, made in keeping the customer happy!">');
$meta = ('<meta name="keywords" content="Programming, CGI, Perl, PHP, JavaScript, Java, Active Server Pages, ASP, C, C++, Developer, Web Development, web, Cybercom, CybercomDesign, Cybercom-Design, Cybercom Design, Design, CybercomPros, Cybercom-Pros, cybercom pros, Pros, CybercomProgramming, Cybercom-Programming, cybercom programming, CybercomNetwork, Cybercom-Network, cybercom network, Networking">');
$meta = ('<meta name="Author" content="Cybercom Pros">');
$meta = ('<meta name="Copyright" content="2004 Cybercom Pros">');
$meta = ('<meta name="robots" content="INDEX, FOLLOW">');
$meta = ('<meta http-equiv="Pragma" content="no-cache">');
$meta = ('<meta http-equiv="Cache-Control" content="no-cache">');
$meta = ('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
</cfscript>


All that outputs is <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

Thank You,
Jordon Bedwell
Cybercom Pros
------------------------------
Planning Is Not Good In Design, You Must Have A Free Spirit!
------------------------------

Texas Design! Texas Pride!

wWw.JoRdOnBeDwElL.CoM

This message was edited by cybercompros on 4-27-04 @ 10:14 PM

CJ
04-27-2004 @ 11:05 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4262
Joined: Oct 2002

because you're overwriting the variable each time.  of course it's going to output the last line...that's the latest assignment of a value that you've given it.

look at my example above again.  notice the content = content & ? Smile  



-CJ-
@ #coldfusion/DALNet
http://charlie.griefer.com

PAGE: 1 2
Sponsored By...
iOpenSoft, LLC is a Houston, Texas Advanced Technology Studio Specializing in Web Design, Web Development, iPhone App Development and Android App Development.