|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
Different TypoScript for different objects on the same recordHello all,
I've posed this question before but haven't quite arrived at a solution yet. I have a record that contains two tt_news items and I need to apply different TypoScript to each. I set up the News objects with TemplaVoila. When I hover over the objects, I see the following: tt_content: 1384 tt_content: 1385 Based on advice I've gotten from this already, I have set up the following TypoScript: lib.news1 = RECORDS lib.news1 { # this is the uid of one of your 2 plugins you created source = 1384 tables = tt_content conf.tt_content < plugin.tt_news conf.tt_content { displayLatest { title_stdWrap.crop = 10 | ... | 1 } } } lib.news2 = RECORDS lib.news2 { # this is the uid of one the other plugin you created source = 1385 tables = tt_content conf.tt_content < plugin.tt_news conf.tt_content { displayLatest { title_stdWrap.crop = 50 | ... | 1 } } } However, this does not crop the title in either tt_news object. Any thought as to why? Thanks, Brian Lamb _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english |
|
|
Re: Different TypoScript for different objects on the same recordAm 06.11.2009, 15:53 Uhr, schrieb Lamb, Brian <blamb@...>:
> Hello all, > I've posed this question before but haven't quite arrived at a solution > yet. I have a record that contains two tt_news items and I need to apply > different TypoScript to each. I set up the News objects with > TemplaVoila. When I hover over the objects, I see the following: > tt_content: 1384 > tt_content: 1385 > Based on advice I've gotten from this already, I have set up the > following TypoScript: > lib.news1 = RECORDS > lib.news1 { > # this is the uid of one of your 2 plugins you created > source = 1384 > tables = tt_content > conf.tt_content < plugin.tt_news > conf.tt_content { > displayLatest { > title_stdWrap.crop = 10 | ... | 1 > } > } > } > lib.news2 = RECORDS > lib.news2 { > # this is the uid of one the other plugin you created > source = 1385 > tables = tt_content > conf.tt_content < plugin.tt_news > conf.tt_content { > displayLatest { > title_stdWrap.crop = 50 | ... | 1 > } > } > } > However, this does not crop the title in either tt_news object. Any > thought as to why? > Thanks, > Brian Lamb could you please post your complete TS? -- Philipp Gampe http://www.philippgampe.info _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english |
|
|
|
|
|
Re: Different TypoScript for different objects on the same recordAm 09.11.2009, 15:06 Uhr, schrieb Lamb, Brian <blamb@...>:
> Hi Philipp, > > That is my complete TS. > > Thanks, > > Brian Lamb > but you only create two libraries you never used them !!! so you have to do something like this page.10.subparts.10 = COA page.10.subparts.10 { 10 < lib.news1 20 < lib.news2 } -- Philipp Gampe http://www.philippgampe.info _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english |
|
|
|
|
|
Re: Different TypoScript for different objects on thesame record> Thank you for your advice. However, that still did not produce the
> intended results. My TypoScript for that page is now: > > lib.news1 = RECORDS > lib.news1 { > # this is the uid of one of your 2 plugins you created > source = 1384 > tables = tt_content > conf.tt_content < plugin.tt_news > conf.tt_content { > displayLatest { > title_stdWrap.crop = 10 | ... | 1 > } > } > } > > Any thoughts as to why this isn't shrinking the titles on the list > elements? Because this is a completely wrong approach. If you read TSref about RECORDS, you will find out that: conf.blah is responsible for the rendering of records from a certain table "blah". These are in your case taken from the table tt_content and they are just the containers of a tt_news plugin you inserted in the backend form. Means: If you change anything at all with your TS you just change the rendering of the containers this way but not the rendering of the plugin. HTH Joey -- Wenn man keine Ahnung hat: Einfach mal Fresse halten! (If you have no clues: simply shut your gob sometimes!) Dieter Nuhr, German comedian Xing: http://contact.cybercraft.de Twitter: http://twitter.com/bunnyfield TYPO3 cookbook (2nd edition): http://www.typo3experts.com _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english |
|
|
Re: Different TypoScript for different objects on the same recordAm 11.11.2009, 15:52 Uhr, schrieb Lamb, Brian <blamb@...>:
> Hi Philipp (and list), > Thank you for your advice. However, that still did not produce the > intended results. My TypoScript for that page is now: > lib.news1 = RECORDS > lib.news1 { > # this is the uid of one of your 2 plugins you created > source = 1384 > tables = tt_content > conf.tt_content < plugin.tt_news > conf.tt_content { > displayLatest { > title_stdWrap.crop = 10 | ... | 1 > } > } > } > lib.news2 = RECORDS > lib.news2 { > # this is the uid of one the other plugin you created > source = 1385 > tables = tt_content > conf.tt_content < plugin.tt_news > conf.tt_content { > displayLatest { > title_stdWrap.crop = 20 | ... | 1 > } > } > } > page.10.subparts.10 = COA > page.10.subparts.10 { > 10 < lib.news1 > 20 < lib.news2 > } > Any thoughts as to why this isn't shrinking the titles on the list > elements? > Thanks, > Brian Lamb this can't work, it is just an example (please read the other mail from Joey) please you have to start reading how to use TS, it will never work if nobody knows how you site is configured as a start I suggest reading "modern template building"... once you are done, please come back and ask any question you like, but I bet you'll find the answer yourself! Best regards Phil -- Philipp Gampe http://www.philippgampe.info _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english |
|
|
Re: Different TypoScript for different objects on the same recordHi Brian,
There are also extensions that add a content element type that is pure typoscript. I haven't tested but could be suitable for you maybe. You could check at least extensions tscobj and typoscript_code. Lamb, Brian kirjoitti: I have a record that contains two tt_news items and I need to apply different TypoScript to each. I set up the News objects with TemplaVoila. When I hover over the objects, I see the following: -- With kind regards Katja Lampela *Lieska-tuotanto * www.lieska.net _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english |
| Free embeddable forum powered by Nabble | Forum Help |