TypoScript: get page title by page id

Andriy picture Andriy · Jul 7, 2011 · Viewed 16.6k times · Source

Task1. In TypoScript I need to get a page title for a given page id {$my_page_uid} Task2. This page title should be recieved according to the current language

I need this title in the form like temp.pTitle, so I can make then page.10 < temp.pTitle

Answer

Mateng picture Mateng · Jul 8, 2011

At a first glance I thought: Haha! That's trivial... but actually it's not. Here is a clever solution for the first part I found in a german forum:

temp.pTitle = HMENU
temp.pTitle {
  special = list
  special.value = {$my_page_uid}
  1 = TMENU
  1 {
    NO {
      doNotLinkIt = 1
    }
  }
}

Don't know if this solves the language part, but it should.