dynamic <title/>

This is a discussion on "dynamic <title/>" within the Starting Out section. This forum, and the thread "dynamic <title/> are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Starting Out

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 17th, 2007, 18:37
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
dynamic <title/>

I have approx 160 pages indexed by google all with the same title because the page is dynamic. is there some way of changing the title dynamically depending on what is dragged from the db.
Reply With Quote

  #2 (permalink)  
Old Aug 17th, 2007, 19:30
SuperMember

SuperMember
Join Date: May 2006
Location: North West, UK
Age: 21
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: dynamic <title/>

Yeah use php or whatever and use the article/ whatever title as the page title. Just stick the code between the <title> tags.

Pete.
Reply With Quote
  #3 (permalink)  
Old Aug 17th, 2007, 19:37
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: dynamic <title/>

Thanks Pete
I thought that was the way to go, now I have to work out how. Do you know any tutorials on the subject.
Reply With Quote
  #4 (permalink)  
Old Aug 17th, 2007, 19:47
SuperMember

SuperMember
Join Date: May 2006
Location: North West, UK
Age: 21
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: dynamic <title/>

I could be (very) wrong here but I'd imagine that you just find out what the variable is that echo/prints the title and use that in your header.

PHP: Select all

 <title>My site name - <?php echo $myVariable?></title>
or you could

PHP: Select all

<title><?php echo "My site name - " $myVariable?></title>
I don't know if there is any real difference, in one (the second one) the php echo's the standard text and pulls the page title and then echos that too, and in the first one the standard text bit is just in the HTML. Not sure.

Bear in mind that my php knowledge is a bit limited. Someone who knows about that sort of thing will correct me if I'm wrong or provide a better solution.

Pete.
Reply With Quote
  #5 (permalink)  
Old Aug 17th, 2007, 19:56
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: dynamic <title/>

I have been searching for days to find a method thats understandable for mear mortals. Once again this forum (Pete) has given me the pointers required.
I'm off to have a go at reducing 160+ pages with the same title.

Cheers

Pat
Reply With Quote
  #6 (permalink)  
Old Aug 17th, 2007, 21:01
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: dynamic <title/>

I thought you might like to know, with the code you provided I have now changed all my pages and they now show exactly what I want.

Cheers

Pat
Reply With Quote
  #7 (permalink)  
Old Aug 17th, 2007, 21:22
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: dynamic <title/>

h1 headings now changed with same code. WOH! amazing what a little bit of code can do
Reply With Quote
  #8 (permalink)  
Old Aug 17th, 2007, 21:36
SuperMember

SuperMember
Join Date: May 2006
Location: North West, UK
Age: 21
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: dynamic <title/>

Great. I thought it would work and am pretty happy it did. It is amazing what you can do with such a tiny bit of code and a little knowledge.

Excellent, well done.

Pete.
Reply With Quote
Reply

Tags
dynamic title, title tag

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
title? Aesir Web Page Design 4 Mar 12th, 2008 15:58
<title>Tennis London : Tennis History</title> how should it read Oak Search Engine Optimization (SEO) 5 Feb 6th, 2008 01:31
alt or title geyids Web Page Design 4 Aug 20th, 2007 15:56
How to set the page title for a PDF? rubeck Classic ASP 0 Feb 27th, 2007 21:37
Not sure how to title this. vbfrost Web Page Design 6 Sep 14th, 2006 20:42


All times are GMT. The time now is 07:07.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43