[TYPO3] pagetitle and tt_news
G.Unger
skyfreak1 at gmx.net
Fri May 30 23:01:37 CEST 2008
hey guys
hereafter some TS that does the job exaclty as requested:
1. the general page title
2. the news title
3. the title for the jobs of the ext dmmmjobcontrol
any other extension should work similar ;)
## the general page title extended
config.noPageTitle = 1
page.headerData.20 = TEXT
page.headerData.20 {
field = title
wrap = <title> | :: {$page_slogan}</title>
}
page.headerData.30 = TEXT
page.headerData.30.value (
)
# set the news headline as html-title on news detail page
[globalVar = TSFE:id = XXX]
temp.newsTitle=COA
temp.newsTitle {
wrap= <title> | :: {$page_slogan}</title>
5=RECORDS
5 {
source = {GPvar:tx_ttnews|tt_news}
source.insertData = 1
tables = tt_news
conf.tt_news >
conf.tt_news = TEXT
conf.tt_news.field=title
}
}
page.headerData.20 < temp.newsTitle
[end]
# set the job name as html-title on job detail page
[globalVar = TSFE:id = XXX]
temp.jobTitle = COA
temp.jobTitle {
wrap= <title> | :: {$page_slogan}</title>
5=RECORDS
5 {
source = {GPvar:tx_dmmjobcontrol_pi1|job_uid}
source.insertData = 1
tables = tx_dmmjobcontrol_job
conf.tx_dmmjobcontrol_job >
conf.tx_dmmjobcontrol_job = TEXT
conf.tx_dmmjobcontrol_job.field = job_title
}
}
page.headerData.20 < temp.jobTitle
[end]
where
{$page_slogan}
is defined in the constants section of the template and shows e.g.
"domain.tld" or in my case a general slogan
rgds,
Guido
Am 30.05.2008 um 18:25 schrieb Dmitry Martynenko:
> Hi Dieter,
>
> DJ> Thanks! It allways used to work. Maybe tt_news update changed
> things? It
> DJ> seems that substitutePagetitle is default allready on 1.
>
> DJ> Now I have 1 more question, since I also let a H1 automatically
> generate
> DJ> on each page :
>
> DJ> lib.topheader = COA
> DJ> lib.topheader {
> DJ> 5 = TEXT
> DJ> 5.value = <h1>
> DJ> 10 = TEXT
> DJ> 10.value = MyCompany:
> DJ> 20 = TEXT
> DJ> 20.value = {page:subtitle // page:title}
> DJ> 20.insertData = 1
> DJ> 25 = TEXT
> DJ> 25.value = </h1>
> DJ> }
>
> DJ> Here I want also the title of a tt_news article instead of the
> page
> DJ> where the single view is located.
>
> There is no simple way to use something like substitutePagetitle for
> this.
> Because it is hard coded PHP code for change page title in tt_news.
>
> You can use something like TS RECORDS to load current tt_news record
> by uid from GET params, fetch title from this and set the value like:
> 20.value = {tt_news:title // page:subtitle // page:title}
>
> I does not have finished code for this, but you can try to find
> similar code.
>
> --
> Dmitry Martynenko
> Developer
>
> Web: http://realt.by
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
More information about the TYPO3-english
mailing list