Skip to main content
Inspiring
July 21, 2008
Question

Document (Page) Title

  • July 21, 2008
  • 4 replies
  • 440 views
Is there a way to get the <title> tag value, ie the current page's title into a CF variable. In Javascript, it is simply document.title. But I need it in a CF variable. Is this possible?
    This topic has been closed for replies.

    4 replies

    Inspiring
    July 22, 2008
    Thanks Ken, that does work. I guess nobody knows of a function call or variable that is available that contains the <title> value. I'll go with this and appreciate the help. I just wish I didn't have to incur overhead reading in the entire source of a page just to get at the title.
    Inspiring
    July 21, 2008
    http://www.beetrootstreet.com/blog/index.cfm/2007/1/5/Extract-page-title--ColdFusion-regular-expression

    --
    Ken Ford
    Adobe Community Expert - Dreamweaver/ColdFusion
    Fordwebs, LLC
    http://www.fordwebs.com


    "KenSchweers" <webforumsuser@macromedia.com> wrote in message news:g62cp4$gk2$1@forums.macromedia.com...
    > Is there a way to get the <title> tag value, ie the current page's title into a CF variable. In Javascript, it is simply
    > document.title. But I need it in a CF variable. Is this possible?

    Inspiring
    July 21, 2008
    Thanks. I'm trying to come up with a tag that I can drop into any page that will be able to obtain the existing page <title>.
    Inspiring
    July 21, 2008
    If this were my problem, I'd set the variable first and then use it for the title.