Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Server-side Scripting _ Page titles

Posted by: wildchild_pt Feb 16 2012, 06:11 AM

Hi,

I was wondering if anybody can help with the correct code to add a page title to a sub-page of my website, for example - http://www.bpcc.pt/newDetail.asp?id=621 - I can hard code the main title to the newDetail.asp but i would like to have a title for each article that is inserted in this section of the website, it would be ideal to grab the title of the article to use as the page title. each new article is inserted via a back office where there is a field for title, a field for the intro and one for the body of the article.

Any help regarding this will be deeply appreciated!

Posted by: Darin McGrew Feb 16 2012, 11:51 AM

That depends entirely on the program (newDetail.asp I believe) that you are using to update your sub-pages.

Posted by: wildchild_pt Feb 16 2012, 12:17 PM

QUOTE(Darin McGrew @ Feb 16 2012, 11:51 AM) *

That depends entirely on the program (newDetail.asp I believe) that you are using to update your sub-pages.


Hi Darin, and thanks for your reply.

I am not too sure i understood your question corectly.
The sub-pages are generated automaticlly from text that I insert to the websites back office, each subpage is basically a new article. the programme that i would use to generate the HTML is usually Dreamweaver (but can be done directly via the FCKtext editor in our back office).

basically the website is set up so that the newDetail.asp file is the master document and each new page is generated with an new id - "?id=621", and each new page will have an article with a title which is what i would like to use as the browser page title but am not sure of the code that i have to use, at this moment every page under the newDetail.asp section has the same browser title of the page which is “British Portuguese Chamber of Commerce”.

In newDetail.asp i have <title>British Portuguese Chamber of Commerce</title>

I was given a pointer as to the code, but i cannot seem to get it to work (I am not to fluent in HTML yet), here goes what i was indicated, maybe you (or somebody else) can add to this...

If id in the URL is 0 or not present
{display the default meta title}
Else if id = a number
{the meta title should be the title of the story corresponding to that ID number}

Any help regarding this will be deeply appreciated!

Posted by: Darin McGrew Feb 16 2012, 09:31 PM

I understand what you're trying to do. But it can't be done with HTML. It has to be done by the publishing system you're using, and I doubt that any of the regulars here are familiar with it.

Posted by: wildchild_pt Feb 17 2012, 06:17 AM

QUOTE(Darin McGrew @ Feb 16 2012, 09:31 PM) *

I understand what you're trying to do. But it can't be done with HTML. It has to be done by the publishing system you're using, and I doubt that any of the regulars here are familiar with it.



sad.gif thanks for your reply, hopefully i will be able to find a solution for this so that google will be able to differentiate these pages on a search.

could i ask what may sound like a stupid question... what do you mean when you say "It has to be done by the publishing system you're using" what would be considered "the publishing system"? is this some kind of software that is embeded in the website that generates the content?

Any help regarding this will be deeply appreciated!

Posted by: Darin McGrew Feb 17 2012, 01:33 PM

QUOTE
The sub-pages are generated automaticlly from text that I insert to the websites back office
That's the publishing system that you're using.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)