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!

Dynamic meta tags?

Status
Not open for further replies.

hpvic03

Technical User
Aug 2, 2006
89
I'm trying to make a website that will have dynamic meta tags based on the information a user requests. Right now I have three meta tags:

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

<meta name="title" content="#variable1# #variable2#">

<meta name="description" content="#variable3# #variable4#">

I wrapped the title with cfoutput tags and it works fine, but when I wrap the description one, I get the text for variables 3 and 4 at the top of my page, which won't work. Does anyone have any ideas on how to tell the meta tags to go to the server first? Any help would be greatly appreciated.
 
it's probably an issue with the value of the description variables containing quotes that mark the end of the meta tag attribute and screw up the rest of the html. (ei: displays text first)

When doing this, always make sure that the values don't have quotes.

otherwise what you are doing is fine, although I have found cfhtmlhead very very useful in certain situations.

Kevin

Phase 1: Read the CFML Reference
Phase 2: ???
Phase 3: Profit!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top