php - Typo3: Simplest way to add a custom field to all tt_content in 6.2 -



php - Typo3: Simplest way to add a custom field to all tt_content in 6.2 -

i using typo3 6.2, has extension builder installed in back-end. have never built extension before , not sure if need to, necessary want.

i have variety of content types on each page, nested within of gridelements columns. want add together "background colour" drop-down content elements can check in typoscript , assign class accordingly:

goal html, "green" , "dark" classes want add:

<div class="row"> <-- gridelements <div class="column size2"> <-- gridelements <div class="module green"> <-- content element greenish bg content: text, image, news content, etc. </div> <div class="module dark"> <-- content element dark bg content: text, image, news content, etc. </div> <div class="module"> <-- content element no bg selected content: text, image, news content, etc. </div> </div> </div>

here's approximately how expect looking "background colour" field in typoscript:

if{ value = 1 <--- equal value of drop-down equals.field = background_colour <--- name of custom field } //then add together class mark-up

i've found handful of tutorials, none of tell me how this. 1 tells me how create whole new content element type, , uses kickstarter rather extension builder: http://castironcoding.com/resources/our-blog/sp/view/show/post/reason-6-for-choosing-typo3-custom-content-elements-and-extbase-again-part-23.html?tx_cicblog_list%5bcontroller%5d=posts&chash=13d15edce9ae768be7dd36a140811b82

this 1 tells me how extend news items: http://docs.typo3.org/typo3cms/extensions/news/latest/main/tutorial/extendingnews/

does know of tutorial in english, or can explain bit, how work add together additional selectable field content elements?

you can utilize typoscript this. add together page.ts config, can select via "appearance/layout"

tceform.tt_content.section_frame { removeitems = 1,5,6,10,11,12,20,21,66 additems { 100 = module greenish 110 = module dark } }

in main typoscript setup, have add:

tt_content.stdwrap.innerwrap.cobject { 100 =< tt_content.stdwrap.innerwrap.cobject.default 100.20.10.value = module greenish 100 =< tt_content.stdwrap.innerwrap.cobject.default 100.20.10.value = module dark }

the sec 1 should give class names u need html.

php typo3

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -