Title Tag
10 posts by 3 authors in: Forums > CMS Builder
Last Post: March 16, 2010 (RSS)
By dustindd - March 12, 2010
Dustin
http://www.DustinDrorbaugh.com
Follow Me On Twitter: http://www.twitter.com/dustindd
Re: [dustindd] Title Tag
By Donna - March 12, 2010 - edited: March 12, 2010
You bet. Just put your title code into the <title> tag. So, you'd have something like this:
<title><?php echo htmlspecialchars($mainRecord['title']) ?></title>
Let me know if that works for you. :)
--
support@interactivetools.com
Re: [Donna] Title Tag
By dustindd - March 15, 2010
That did not work. Instead of the article title being displayed the entire URL of the file is displayed. I attached my php file if you want to take a quick look.
http://www.DustinDrorbaugh.com
Follow Me On Twitter: http://www.twitter.com/dustindd
Re: [dustindd] Title Tag
By Donna - March 15, 2010
It doesn't look like the file got attached, can you try that again?
--
support@interactivetools.com
Re: [Donna] Title Tag
By dustindd - March 15, 2010
http://www.DustinDrorbaugh.com
Follow Me On Twitter: http://www.twitter.com/dustindd
Re: [dustindd] Title Tag
By Donna - March 15, 2010
Make sure the code from CMS Builder is right at the top of the page. Where it says "Step 1" that should be at the VERY top, before anything else (even before your doctype declaration.)
The title isn't showing because it doesn't know where to grab it from -- the PHP works "in order" from top to bottom of the page, so anything above that code block won't show.
I hope this helps. :)
--
support@interactivetools.com
Re: [Donna] Title Tag
By dustindd - March 16, 2010
I'm getting a notice "Undefined variable mainRecord in -home-dustindd-public_html-html-news.php on line 23" and I moved the first section of php code to the very top. This is not adding up. I just want the title of the article to be displayed in the <title> tags.
http://www.DustinDrorbaugh.com
Follow Me On Twitter: http://www.twitter.com/dustindd
Re: [dustindd] Title Tag
By aev - March 16, 2010
Try this..
Change:
<title><?php echo htmlspecialchars($mainRecord['title']) ?></title>
To:
<title><?php echo htmlspecialchars($newsRecord['title']) ?></title>
-aev-
Re: [dustindd] Title Tag
By Donna - March 16, 2010
Yup, what aev said -- with any examples we give, make sure you change any variables (like the section names) to match your own. You can compare against the code from your code generator -- all this is is the bit of echo code for the "title" field. :)
--
support@interactivetools.com
Re: [Donna] Title Tag
By dustindd - March 16, 2010
http://www.DustinDrorbaugh.com
Follow Me On Twitter: http://www.twitter.com/dustindd