Oh, sorry, the example is still using some register here, should be this of
course:
10 = CASE
10 {
//key.data = register:tt_news_type
key.cObject = RECORDS
key.cObject {
tables = tt_news
dontCheckPid = 1
source {
data = GP:tx_ttnews|tt_news
intval = 1
}
conf.tt_news = TEXT
conf.tt_news.field = type
}
default = TEXT
default.value = DEFAULT
3 = TEXT
3.value = THREE
4 = TEXT
4.value = FOUR
}
The commented line is what you could use if you've got the value stored already.
Cheers,
Loek
On 11-05-14 21:56, Loek Hilgersom wrote:
Hey Robert,
You'll need an extra query to achieve that, unless you'll be able to access the
data from the news records from some place where it's already been retrieved.
If that's done in TypoScript then you can store the values in a register to
avoid the extra query.
With the query it will be something like this:
10 = CASE
10 {
//key.data = register:tt_news_type
key.cObject = RECORDS
key.cObject {
tables = tt_news
dontCheckPid = 1
source.data = register:tt_news_uid
conf.tt_news = TEXT
conf.tt_news.field = type
}
default = TEXT
default.value = DEFAULT
3 = TEXT
3.value = THREE
4 = TEXT
4.value = FOUR
}
Is this what you're after?
Hth, and greetings!
Loek
On 11-05-14 14:19, Robert Wildling wrote:
Hi,
I create several new content types (in tt_news at thte moment) via
ext_tables.php like this:
// add the new type
$TCA['tt_news']['columns']['type']['config']['items'][] = Array('New Page
Type',4);
Each of those page types needs a little bit of additional TypoScript for
selecting its own template file and activating some generic markers. The editors
shall have the possibiliy to just choose the page type, and everything should
work out-of-the-box (so no need to implement an additional TypoScript file
manually).
Is there a way to activate the specific TypoScript according to tt_news type?
Something like
[globalVar = GP:tt_news|type=4]
[...]
"Type" is neither a get nor post var... any other way to implement that
functionality?
Thanks for your tipps!
Robert
_______________________________________________
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english