Typo3 - TSConfig: Unterschied zwischen den Versionen

Aus Wikizone
Wechseln zu: Navigation, Suche
Zeile 78: Zeile 78:
  
 
==== Komplette Konfiguration ====
 
==== Komplette Konfiguration ====
 +
<pre>
 
### Default Page TSconfig ###
 
### Default Page TSconfig ###
  
Zeile 297: Zeile 298:
 
     RTE.default.FE.userElements >
 
     RTE.default.FE.userElements >
 
     RTE.default.FE.userLinks >
 
     RTE.default.FE.userLinks >
 +
</pre>
  
 
== Default Page TSConfig ==
 
== Default Page TSConfig ==

Version vom 16. Oktober 2008, 11:10 Uhr

weitere Infos unter Typo3 - Backend anpassen

TSconfig

Außer mit den TS Templates lassen sich einige Einstellungen auf Seitenebene und User Ebene einstellen. Diese Einstellungen heißen entsprechend User TSconfig und Page TSconfig.

User TSconfig

Auf Benutzerebene stellt man Eigenschaften im TSConfig Feld der Benutzer-Konfiguration ein.

Nützliche Beispiele - User TSConfig

  1. Admin Panel eingeklappt, Stifte angezeigt und als Popup geöffnet
admPanel {
  enable.edit = 1
  module.edit.forceNoPopup = 0
  module.edit.forceDisplayFieldIcons = 1
  module.edit.forceDisplayIcons = 0
  hide = 1
}
  1. Shortcuts
options.shortcutFrame = 1
  1. Einstellungen die früher nur im PageTS vorgenommen wurden:
page.options.clearCache.pages = 1
page.options.clearCache.all = 1

page.mod {
   SHARED.colPos_list = 0,2
 }

Default User TSconfig

im conf File direkt eintragen

$TYPO3_CONF_VARS['BE']['defaultUserTSconfig']=' [da rein die Konfiguration] ';

PageTSConfig

Diese Einstellungen kann man bei den Eigenschaften der Seite im TSConfig Feld einstellen. Die Eigenschaften können auch im User TSConfig genutzt werden, dazu wird im TSConfig Feld des Users einfach ein page. vorangestellt. Im Konfliktfall gelten die User Einstellungen


Nützliche Beispiele

Dropdown Feld für Cache bei normalen Benutzern einschalten

options.clearCache.pages = 1
options.clearCache.all = 1

stellt ein Dropdownfeld zur Verfügung mit dem der Benutzer für einzelne und für alle Seiten den Cache löschen kann.


Spalten

mod {
  SHARED.colPos_list = 0,2
}

Zeigt nur die Spalten Normal und Rechts an. (Links=1, Normal=0, Rechts=2,Rand =3).

Dropdown-Feld für die Überschrift anpassen

So kann man die überflüssigen Menüeinträge im Feld Header löschen(100 steht für den Wert versteckt):

TCEFORM.tt_content.header_layout.removeItems = 2,3,4,5,100

Trick: Wenn man nicht weiß welchen Wert ein eintrag hat, einfach diesen Wert verwenden und in der Datenbank nachgucken.

Überschreiben der Menüeinträge:

TCEFORM.tt_content.header_layout.altLabels.0 = Überschrift Text
TCEFORM.tt_content.header_layout.altLabels.1 = Überschrift Grafik

Dropdownfeld für Rahmen anpassen

#Überflüssige Rahmeneinträge entfernen
TCEFORM.tt_content.section_frame.removeItems = 10, 11, 12, 20, 21 

TCEFORM.tt_content.section_frame.altLabels.1 = Breit
TCEFORM.tt_content.section_frame.altLabels.5 = Schmal links
TCEFORM.tt_content.section_frame.altLabels.6 = Schmal rechts

Auswahl möglicher Einstellungen

Komplette Konfiguration

### Default Page TSconfig ###

//Columns

mod.SHARED.colPos_list = 0,2,3

TCEFORM {
    tt_content {
        // for the section frame (used by contentwrapper):
        section_frame.removeItems = 1,5,6,10,11,12,20,21
        // Let use all the space available for more comfort.
        bodytext.RTEfullScreenWidth= 100%
        CType.removeItems = bullets,table,uploads,search,login,splash,div,script,html
    }

    pages {
         // page titles cannot be edited
#        title.disabled = 1
#        doktype.removeItems = 199, 255
#        doktype.addItems.124 = LLL:EXT:lang/locallang_tca.php:title
#        doktype.altLabels.1 = STANDARD page type
    }
}



TCEMAIN {
#    clearCacheCmd = 12,23
#    clearCache_pageSiblingChildren = 1
# clearCache_pageGrandParent = 1
    // default user and group for new pages
#    permissions.userid = 3
    permissions.groupid = 1

    // set list of rights
    user = show,edit,delete,new,editcontent
    group = show,edit,delete,new,editcontent
    everybody = show

    // instead of default you can put also table.tablename (ie. table.tt_conent)
    default {
        history.keepEntries = 50
        history.maxAgeDays = 60
        disablePrependAtCopy = 1
        disableHideAtCopy = 0
    }
}


###  RTE  ###

// RTE.classes definitions are only relevant for the BE mask to help the user choose the correct style

RTE.classes {
    important {
        name = LLL:EXT:rtehtmlarea/htmlarea/plugins/DynamicCSS/locallang.xml:important
        value = color: #8A0020;
    }

    name-of-person {
        name = LLL:EXT:rtehtmlarea/htmlarea/plugins/DynamicCSS/locallang.xml:name-of-person
        value = color: #10007B;
    }

    detail {
        name = LLL:EXT:rtehtmlarea/htmlarea/plugins/DynamicCSS/locallang.xml:detail
        value = color: #186900;
    }
}

    // Anchor classes configuration for use by the anchor accesibility feature (htmlArea RTE only)

RTE.classesAnchor {
    externalLink {
        class = external-link
        type = url
        titleText = LLL:EXT:rtehtmlarea/htmlarea/plugins/TYPO3Browsers/locallang.xml:external_link_titleText
    }

    externalLinkInNewWindow {
        class = external-link-new-window
        type = url
        titleText = LLL:EXT:rtehtmlarea/htmlarea/plugins/TYPO3Browsers/locallang.xml:external_link_new_window_titleText
    }

    internalLink {
        class = internal-link
        type = page
        titleText = LLL:EXT:rtehtmlarea/htmlarea/plugins/TYPO3Browsers/locallang.xml:internal_link_titleText
    }

    internalLinkInNewWindow {
        class = internal-link-new-window
        type = page
        titleText = LLL:EXT:rtehtmlarea/htmlarea/plugins/TYPO3Browsers/locallang.xml:internal_link_new_window_titleText
    }
    download {
        class = download
        type = file
        titleText = LLL:EXT:rtehtmlarea/htmlarea/plugins/TYPO3Browsers/locallang.xml:download_titleText
    }

    mail {
        class = mail
        type = mail
        titleText = LLL:EXT:rtehtmlarea/htmlarea/plugins/TYPO3Browsers/locallang.xml:mail_titleText
    }
}



// Default RTE configuration

RTE.default {
#    contentCSS = EXT:wmnusersettings/templates/css/rte.css
    // Use stylesheet file rather than the above mainStyleOverride and inlineStyle properties to style the contents (htmlArea RTE only)
    ignoreMainStyleOverride = 1

    // When enabled, Mozilla/Firefox use span tags with style attributes rather than tags such as b, i, font, etc
    useCSS = 0

    // do not show "new magic image", keylist is magic,plain,dragdrop
    blindImageOptions = magic

    // Markup options (htmlArea RTE only)
    enableWordClean = 1
    removeTrailingBR = 1
    removeComments = 1
    removeTags = center, font, o:p, sdfield, strike,u
    removeTagsAndContents = style,script

    //If set, the examples of classes in Paragraph and 
    //Character selectors are disabled

    disablePCexamples = 1

    //leave these and modify property toolbarOrder to add or 
    //remove items!

    showButtons = blockstylelabel, blockstyle, textstylelabel, textstyle, fontstyle, fontsize, formatblock, bold, italic, underline, strikethrough, subscript, superscript, lefttoright, righttoleft, left, center, right, justifyfull, orderedlist, unorderedlist, outdent, indent, textcolor, bgcolor, textindicator, emoticon, insertcharacter, line, link, image, table, user, acronym, findreplace, spellcheck, chMode, inserttag, removeformat, copy, cut, paste, undo, redo, showhelp, about, toggleborders, tableproperties, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit, columninsertbefore, columninsertafter, columndelete, columnsplit, cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge

    toolbarOrder (
        formatblock,textstylelabel, textstyle,bar,copy, cut, paste, bar,chMode, inserttag, removeformat, linebreak,
        bold, italic, underline, bar,left, center, right, justifyfull, bar,subscript,superscript,bar,orderedlist, unorderedlist, outdent, indent, bar, link, image
    )

    // Enable status bar (htmlArea RTE only)
    showStatusBar =  1

    // Hide infrequently used paragraph types in the paragraph type selector (formatblock button)
    hidePStyleItems = pre,address,h5,h6


    // List all class selectors that are allowed on the way to the database

    proc.allowedClasses (
        external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail,
        align-left, align-center, align-right,
        csc-frame-frame1, csc-frame-frame2,
        component-items, action-items,
        component-items-ordered, action-items-ordered,
        important, name-of-person, detail
    )



    // modify some default settings
    proc.entryHTMLparser_db.tags {
    	// we do not like default settings for p
        p >
        div.fixAttrib.align.unset = 0
        img.allowedAttribs = alt,title,src,width,height
    }


    ## classesParagraph, classesTable, classesTD, classesLinks, classesCharacter
    ## Classic RTE: Specify the list of class selectors that should be presented in the RTE interface:
    ## htmlArea RTE: Restrict the list of class selectors presented by the RTE to the following:

    classesParagraph (
        align-left, align-center, align-right
    )


    classesTable =
    classesTD = align-left, align-center, align-right
    classesLinks = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail

    classesCharacter = important, name-of-person, detail

    // Configuration of the anchor accessibility feature (htmlArea RTE only)
    // These classes should also be in the list of allowedClasses.
    classesAnchor = external-link, external-link-new-window, internal-link, internal-link-new-window, download, mail
    classesAnchor.default {
        page = internal-link
        url = external-link-new-window
        file = download
        mail = mail
    }


    // Configuration specific to the TableOperations feature (htmlArea RTE only)
    // Remove the following fieldsets from the table operations dialogs

    disableAlignmentFieldsetInTableOperations = 1
    disableSpacingFieldsetInTableOperations = 1
    disableColorFieldsetInTableOperations = 1
    disableLayoutFieldsetInTableOperations = 1
    disableBordersFieldsetInTableOperations = 1
}

    // front end RTE configuration for the general public (htmlArea RTE only)
    RTE.default.FE < RTE.default
    RTE.default.FE.showStatusBar = 0
    #RTE.default.FE.hideButtons = chMode, blockstyle, textstyle, underline, strikethrough, subscript, superscript, lefttoright, righttoleft, left, center, right, justifyfull, table, inserttag, findreplace, removeformat, copy, cut, paste

    RTE.default.FE.FE >
    RTE.default.FE.userElements >
    RTE.default.FE.userLinks >

Default Page TSConfig

Im Conf File kann man feste Einstellungen vornehmen

$TYPO3_CONF_VARS['BE']['defaultPageTSconfig']='
	TCEFORM.pages.TSconfig.linkTitleToSelf=1
';