[TYPO3] pagetitle and tt_news

G.Unger skyfreak1 at gmx.net
Sun Jun 1 04:35:00 CEST 2008


... I partciulary like the snipppet I posted due to the fact, that I  
can address any (even multiple conjuncted) DB field to be shown as  
pagetitle ;)

cheers folks

GUIDO



Am 31.05.2008 um 20:42 schrieb Dieter Jansen:

> Hi Francois,
>
> Thanks for your reaction, and I allready read the linked article.
> But if I put this, like you suggested :
>
> lib.desc = COA
> lib.desc {
> 	5 = TEXT
> 	5.value = <h1>
> 	10 = TEXT
> 	10.value = {$title}:
> 	10.wrap = <span class="desc"> | </span>
> 	20 = TEXT
> 	20.value = &nbsp;{field:subtitle // TSFE:page|title}
> 	20.insertData = 1
> 	25 = TEXT
> 	25.value = </h1>
> 	}
>
> It does not display the title of the tt_news article, but the  
> pagetitle
> of the page where the single display of tt_news is on.
>
> So I use an exception for that page and use Guido's part
>
> 20=RECORDS
>     20 {
> 		source = {GPvar:tx_ttnews|tt_news}
> 		source.insertData = 1
> 		tables = tt_news
> 		conf.tt_news >
> 		conf.tt_news = TEXT
> 		conf.tt_news.field=title
> 		}
>
> And according to the Typoscript Object Browser [substitutePagetitle]=1
> is allready set default. So no need to set it manually in TS again?
>
> However on older sites (older version of tt_news, same version of  
> TYPO3,
> 4.16) this allways was enough for showing the tt_news title :
>
> 20.value = &nbsp;{page|title}
>
> grts
>
>> Hi Dieter,
>>
>>> It seems that the easiest way to get the sitename and title in the
>>> pagetitle is how Dmitry Martyenko described it, just fill in the
>>> "domain name" to "Website title" field in root template. No TS  
>>> needed
>>> and it works for tt_news.
>>
>> It may be the easiest, but the way you did it opens the door to far  
>> more
>> variants, which are better for referencing. You may want to take a  
>> look
>> at that article:
>>
>> http://www.dawsoninteractive.com/articles/article/typo3-seo-introduction/
>>
>>> Thanks Guido for your usefull tip, especially the TS to get the
>>> tt_news title of an article. I use it now to automatically  
>>> generate an
>>> H1.
>>
>> That may be useful in a case other than tt_news, but when using:
>>
>> plugin.tt_news {
>>  substitutePagetitle = 1
>> }
>>
>>
>> the title of the news is loaded in $GLOBALS['TSFE']->page['title']  
>> which
>> you can retrieve by TS as shown in my example:
>>
>> ...data = TSFE:page|title
>>
>> Guido's method is correct and useful, but queries the database  
>> which is
>> unnecessary in this case.
>>
>> Cheers
>>
>
> _______________________________________________
> 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