page.config.doctype = <!DOCTYPE html>
# Sprache einstellen: page.config.htmlTag_langKey = de # Alle Parameter des HTML Tags konfigurieren: page.config.htmlTag_setParams = class="no-js" lang="de"
Um ein Stylesheet einzubinden, wird folgender Code in das Setup-Feld des entsprechenden Templates eingefügt:
page.includeCSS { file1 = fileadmin/templates/style.css file1.media = all }
Inline-CSS per Template:
page.cssInline { 10 = TEXT 10.value = .card-image {background: #29ABE2;} } // Die Konfiguration inlineStyle2TempFile auf Null sezten, // damit TYPO3 den CSS Code nicht in eine externe Datei auslagert config.inlineStyle2TempFile = 0
Um ein Javascript einzubinden, wird folgender Code in das Setup-Feld des entsprechenden Templates eingefügt:
page.includeJS.file1 = fileadmin/templates/js/javascriptdatei.js
Ins Setup des Templates:
tt_content.stdWrap.innerWrap2 = | <p class="bodytext"><a href="javascript:history.back()">« zurück</a></p>
temp.datum = TEXT temp.datum { data = date : U strftime = %D #Datum im US-Format, ist das Gleiche wie %m/%d/%y }
s. PHP Manual
Die Zeile
config.disableImgBorderAttr = 1
im Root-Template entfernt das obsolete border-Attribut bei Bildern (ggf. im CSS noch img {border: none;}
setzen).
Setup-Feld der Templates:
config.fileTarget = _blank
config.spamProtectEmailAddresses = ascii
Und wenn man trotzdem den Klammeraffen anzeigen möchte:
config.spamProtectEmailAddresses_atSubst = @
config.noPageTitle = 2 page.headerData.10 = TEXT page.headerData.10.field = abstract // title page.headerData.10.wrap = <title>|</title>
Beispiel: (entfernt alle Wraps um Bilder inkl. der Position und der Floats)
# Remove some wraps tt_content.image.20.imageStdWrap.dataWrap > tt_content.image.20.imageStdWrapNoWidth.dataWrap > tt_content.image.20.imageColumnStdWrap.dataWrap > # Redefine the layout switch with only one default case tt_content.image.20.layout > tt_content.image.20.layout = CASE tt_content.image.20.layout.key.field = imageorient tt_content.image.20.layout.default = TEXT tt_content.image.20.layout.default.value = ###IMAGES### ###TEXT### # Remove the wrap around the image subtext tt_content.textpic.20.text.wrap = | # Define a new rendering method without wraps tt_content.image.20.rendering.noWraps { imageRowStdWrap.dataWrap = | noRowsStdWrap.wrap = oneImageStdWrap.dataWrap = | imgTagStdWrap.wrap = | editIconsStdWrap.wrap = | caption.wrap = | } # Set this as active rendering method tt_content.image.20.renderMethod = noWraps
Quelle: http://stackoverflow.com/questions/31579124/how-to-remove-div-around-an-image-in-typo3
lib.categories { 10 = TEXT 10 { data = page:subtitle wrap = <h2 class="singleSubtitle">|</h2> override.cObject = CONTENT override.cObject { table = sys_category select { pidInList = 4 selectFields = sys_category.* join = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid where.data = field:_ORIG_uid // field:uid where.intval = 1 where.wrap = sys_category_record_mm.uid_foreign=| orderBy = sys_category_record_mm.sorting_foreign max = 1 } renderObj = COA renderObj { 10 = TEXT 10.field = title } } } }