Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Total CFM Newbie!!!

Status
Not open for further replies.

MicahDB

Programmer
Jul 15, 2004
96
US
I have a straight HTML site that I'm 'suddenly required' (long story on why it's suddenly required, don't ask) to host on a windows 2000 server running cf 6.1. I have ZERO experience with cold fusion and don't normally require it, but in this case I just need some basics. I normally right asp or .net but in this case there is no scripting being done, but I am using stylesheets.

Any comments, advise or words of wisdom? Is there anything I need to do in the code once I post the site? Obviously I need to change the files to cfm, other than that...?

Thanks in advance.

Micah
 
In a similar situation, I found Macromedia's (now Adobe's) Fast Track to Cold Fusion got me started well.

Harry
 
I appreciate the reply, Harry but I a) can't charge this back to the client and have to interest in learning this for myself and b) don't have time to spend three days on a class to find out if my HTML is going render appropriately. I'm generally looking for some advise. Nothing major some tips for someone who has been forced outside his comfort zone.

Thanks,
Micah
 
If your site is straight HTML (and CSS) with no CF code then your pages will still render perfectly fine. Just because you're now hosting the site on a CF server doesn't mean you need to use CF code.

But if you do decide to some CF code (which I would recommend because of its dynamicness) here are some helpful and quick tips:

[ol]
[li]wrap ALL cfcode in <cfoutput>...</cfoutput> tags[/li]
[li]CF process ALL code wrapped inside the # sign. Like <cfoutput>my name is #name#.</cfoutput> as: my name is Bob. where 'Bob' will be the name cf server returns once it processes the variable #name#.[/li]
[li][/li]
[/ol]
[/list]

____________________________________
Just Imagine.
 
one thing you need to worry about is the # signs. CF considers them as variables, so if you have a style definition like

#myDiv { .... }

in a CF page, this will throw an error. also, similar thing with the colors #FFFFFF must read ##FFFFFF or FFFFFF

hope it helps.

 
Sorry hit submit by accident


Helpful tips:
[ol]
[li]wrap ALL cfcode in <cfoutput>...</cfoutput> tags[/li]
[li]CF process ALL code wrapped inside the # sign. Like <cfoutput>my name is #name#.</cfoutput> as: my name is Bob. where 'Bob' will be the name cf server returns once it processes the variable #name#.[/li]
[li]to escape the # within <cfoutput> tags, you double up on it. If you do this: <cfoutput>my name is #name# and I live in apr #3</cfoutput>, you will get an error because CF wil try to parese the portion in bold. Since you don't CF to parse #3, you double up on the # as ##3 so CF will ignore the #-sign[/li]
[/ol]

Take a look at:

____________________________________
Just Imagine.
 
GUJUm0deL is right, you can put your existing code on the CF Server and it will run fine without making any changes. The web server processes the HTML, the ColdFusion Server processes the CFML. If it's not a CFM page, then the web server handles everything and the CF Server is not even used.


Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
Ahhh, the # aspect is interesting! Specifically with css and Opera. I think it's Opera that requires the # for your colors. One of the browsers doesn't like bgcolor = FFFFFF; in a css line. Is this an instance where I can put ##?
 
All,

Again, thanks for your help before. So I'm in the process of migrating the stright html site to cfm and I'm running into a few snags and thought I'd run them past everyone. In my css, as mentioned before I have instances like the following:

#navcontainer
{
margin: 0;
padding: 0 0 0 12px;
}

#navcontainer UL
{
list-style: none;
margin: 0;
padding: 0;
border: none;
}

What do I need to do with these '#'? I tried to go with a '##' and my css navigation still rendered as a list rather than a horizonal nav bar.

Thanks in advance smart people.

Micah
 
where are your CFOUTPUT tags? they shouldn't be around anything in your style sheet, unless you were using the "dynamicness" of coldfusion to change the css values on the fly, in which case i would say that you are well beyond the stage where you actually do need to have an interest in learning some of this

i think you might have changed every page from .html to .cfm, because you said "Obviously I need to change the files to cfm..." and that was wrong, you don't


r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top