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
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.
lib.pagetitle = RECORDS
lib.pagetitle {
source.data = page:uid
tables = pages
conf.pages = TEXT
conf.pages.field = nav_title
}
To get current page title:
lib.pagetitle = TEXT
lib.pagetitle.field=title
temp.pTitle = TEXT
temp.pTitle.data = DB:pages:{$my_page_uid}:title
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With