Typo3 - Tipps und Tricks: Unterschied zwischen den Versionen
| Zeile 583: | Zeile 583: | ||
== Schnipsel von http://dokuwiki.intersolution.ch/linux/typo3/typoscript == | == Schnipsel von http://dokuwiki.intersolution.ch/linux/typo3/typoscript == | ||
| − | + | === Typoscript === | |
| − | |||
===== Template erstellen ===== | ===== Template erstellen ===== | ||
Version vom 20. Juli 2006, 13:52 Uhr
mehr auf Typo3 - TS Templates und: Typo3 - Wichtige TypoScript Einstellungen
Rendering von Content Elementen
weitere Infos unter:
Typo3 - Content Elemente anpassen
Datum einfügen
z.B. als Marker im Template und dann im TS-Setup so:
### datum ###
marks.DATE = COA_INT
marks.DATE {
10 = TEXT
10.data = date:U
10.strftime = %A, %d.%m.%Y
10.wrap = |
}
Neuste Inhalte anzeigen
Quelle: http://typo3.umloud.dk/index.php?id=360 22.5.2006
This shows the content elements in the normal column of the page last created/edited.
Note: "tstamp" ONLY get changed/set when you create a new page, or edit the page header NOT when you insert a content element on a page..
lib.newestContent = COA
lib.newestContent {
# First we collect the uids on all levels of the site
# Gets the uids on 1st level
10 = LOAD_REGISTER
10.level1uids.cObject = CONTENT
10.level1uids.cObject {
table = pages
select.pidInList.data = leveluid:0
renderObj = TEXT
renderObj.field = uid
renderObj.wrap = |,
}
# Gets the uids on 2nd level
20 = LOAD_REGISTER
20.level2uids.cObject = CONTENT
20.level2uids.cObject {
table = pages
select.pidInList.cObject = TEXT
select.pidInList.cObject.data = register:level1uids
renderObj = TEXT
renderObj.field = uid
renderObj.wrap = |,
}
# Gets the uids on 3rd level
30 = LOAD_REGISTER
30.level3uids.cObject = CONTENT
30.level3uids.cObject {
table = pages
select.pidInList.cObject = TEXT
select.pidInList.cObject.data = register:level2uids
renderObj = TEXT
renderObj.field = uid
renderObj.wrap = |,
}
# Gets the uids on 4th level
40 = LOAD_REGISTER
40.level4uids.cObject = CONTENT
40.level4uids.cObject {
table = pages
select.pidInList.cObject = TEXT
select.pidInList.cObject.data = register:level3uids
renderObj = TEXT
renderObj.field = uid
renderObj.wrap = |,
}
# Gets the uids on 5th level
50 = LOAD_REGISTER
50.level5uids.cObject = CONTENT
50.level5uids.cObject {
table = pages
select.pidInList.cObject = TEXT
select.pidInList.cObject.data = register:level4uids
renderObj = TEXT
renderObj.field = uid
renderObj.wrap = |,
}
# Gets the uids on 6th level
60 = LOAD_REGISTER
60.level5uids.cObject = CONTENT
60.level5uids.cObject {
table = pages
select.pidInList.cObject = TEXT
select.pidInList.cObject.data = register:level5uids
renderObj = TEXT
renderObj.field = uid
renderObj.wrap = |,
}
# next we combine all of them into one list of uids
70 = LOAD_REGISTER
70.alluids.cObject = COA
70.alluids.cObject {
10 = TEXT
10.data = register:level1uids
20 = TEXT
20.data = register:level2uids
30 = TEXT
30.data = register:level3uids
40 = TEXT
40.data = register:level4uids
50 = TEXT
50.data = register:level5uids
60 = TEXT
60.data = register:level6uids
70 = TEXT
70.data = leveluid:0
}
# Test output
#75 = TEXT
#75.data = register:alluids
#75.wrap = [|]<br>
# More Testoutput
80 = CONTENT
80 {
table = pages
select {
pidInList.data = register:alluids
orderBy = tstamp DESC
max = 1
}
renderObj = COA
renderObj {
10 = TEXT
10.field = title
10.wrap = The newest page is: <b>|</b>
20 = TEXT
20.field = tstamp
20.strftime = %d-%b-%Y %H:%M:%S
20.wrap = which was last edited: |<br>
}
}
# And the final output of the content elements
90 = COA
90 {
wrap = And here are the content in the normal column of that page:<hr>|<hr>
10 = CONTENT
10 {
table = tt_content
select {
orderBy = sorting
where = colPos=0
languageField = sys_language_uid
pidInList.cObject = CONTENT
pidInList.cObject {
table = pages
select {
pidInList.data = register:alluids
orderBy = tstamp DESC
max = 1
}
renderObj = TEXT
renderObj.field = uid
}
}
}
}
}
Einstellungen für Bilder
Größe (maximal, minimal, Popups, Skalierung, Bildunterschriften...)
Border Attribut loswerden
config.config.disableImgBorderAttr = 1
Wichtig wenn man mit CSS arbeiten möchte.
Link to Top
Darstellung von Tabellen
Betrifft hauptsächlich das static Template content(default)
clear.gif und Absätze loswerden
content(default)
# Entfernen der <img src="clear.gif' ...> content.headerSpace = 0|0 content.space = 0|0
body tag
Im Page Objekt kann man das REndering des body tag beeinflussen:
page.bodyTag = <body>
externe Links
_self oder _blank, aussehen...
styles.content.links.extTarget (bei css_styled_content)
Links und Sitemap
Die Links einer eingebundenen Sitemap sind standardmäßig auf den Wert 'page' eingestellt (Typo 3.8). Das macht nur bei Framesets Sinn.
Die relevanten Setup-Werte die man ändern muß (je nach ausgewählter Sitemap):
tt_content.menu.20.1.1.target = _self tt_content.menu.20.2. [...]
Listenpunkte und Aufzählungen
Layoutauswahl
siehe Typo3 - Rahmen (Frames) für Rahmen
und Typo3 - Backend anpassen für Header (Überschriften)
Inline CSS loswerden
Bei vielen Extensions und bei CSS Styled ImgText liegt das CSS Inline. Besser wäre ist es das CSS komplett in eigene Dateien auszulagern.
# Inline Styles auslagern config.inlineStyle2TempFile = true
JavaScript in externe Datei auslagern
Z.B. der kleine JavaScript Schnipsel für das Blur im IE auslagern. Wie bindet man externes JavaScript ein...
siehe unter Typo3 - HTML Code optimieren
Ausgabe einer Spalte Wrappen
Beispiel:
#Inhalt rechts subparts.CONTENT_RIGHT < styles.content.getRight #Ganze Spalte Wrappen subparts.CONTENT_RIGHT.wrap = <div class="content_right"> | </div> #Einzelnes Element Wrappen subparts.CONTENT_RIGHT.renderObj.stdWrap.wrap=<div class="bordered">|</div>
Ausgabe einer Spalte Wrappen wenn nicht leer
Hier wird das content element nur mit einem div gewrapt wenn es nicht leer ist
temp.rightContent < styles.content.getRight
temp.rightContent.stdWrap {
wrap = <div id="right-main"> | </div>
if.isTrue.numRows < styles.content.getRight
}
(TypoWizard.com 9.1.2006)
p style="margin:0 0 0 0;" aus dem p-Tag rausnehmen
tt_content.text.20.parseFunc.nonTypoTagStdWrap.encapsLines.addAttributes.P.style=
Backend anpassen
Content element wizard ändern
aus http://krungkuene.org/krung/wiki/Typo3.html 18.5.2006
Dafür erweitere die php-Klasse SC_db_new_content_el und speichere diese datei unter typo3conf/ux_SC_db_new_content_el.php
<?php
class ux_SC_db_new_content_el extends SC_db_new_content_el {
// Modify the Wizard Array, which holds the values shown at create new
//record page:
function wizardArray() {
global $LANG,$TBE_MODULES_EXT;
$wizardItems = array(
"common" => array("header"=>"Typical page content"),
'common_1' => array(
"icon"=>'../typo3conf/hos/intext_left_wi.gif',
'title'=>'Text with Image to the left',
'description'=>'A regular text element which contains a image positioned left to the text',
'params'=>'&defVals[tt_content][CType]=textpic&defVals[tt_content][imageorient]=26&defVals[tt_content][imagewidth]=80',
),
"common_2" => array(
"icon"=>'../typo3conf/hos/fdfx_2cols.gif',
"title"=>'Two Column Text',
"description"=>'A Text with two Column',
'params'=>'&defVals[tt_content][CType]=fdfx_2cols_pi1'
),
'common_3' => array(
"icon"=>'../typo3conf/hos/intext_right_wi.gif',
'title'=>'Text with big Image to the right',
'description'=>'A regular text element which contains a image positioned right to the text',
'params'=>'&defVals[tt_content][CType]=textpic&defVals[tt_content][imageorient]=25&defVals[tt_content][imagewidth]=480',
'tt_content_defValues' => array(
'CType' => 'textpic',
'imageorient' => 25,
'imagewidth' => 480,
)
),
);
return $wizardItems;
}
}
?>
Um das ganze auch zu verwenden, mache diesen Eintrag in typo3conf/localconf.php
$TYPO3_CONF_VARS["BE"]["XCLASS"]["ext/cms/layout/db_new_content_el.php"] = PATH_typo3conf."class.ux_db_new_content_el.php";
Login Bild im Backend anpassen
Quelle: http://www.allanime.org/?id=143
Introduction
The TYPO3 backend login displays a nice image left of the actual username/password login box. Currently an image of a pair of gloves is used. If you happen to install the CVS version of TYPO3 the image will differ from what you're used to see. I remember a yellow flower in older versions (3.6) of TYPO3 an image that is still present in /typo3/gfx/ named loginbox_image_360.jpg. What's happening there?
TYPO3 has a very cute feature which changes the login box image on certain circumstances. The code is actually in /typo3/index.php. Browsing this code I found another great feature: TYPO3 is also able to „rotate“ images given in a certain directory! All you have to do is, point TYPO3 to this directory. TYPO3 will load all image files in this directory and display a random image.
The way to show TYPO3 this directory is by setting the variable $TBE_STYLES['loginBoxImage_rotationFolder'] = path_to_dir/
Unfortunately there is no way to to so without some programming. The TYPO3 init script explicitly deletes the whole array before initializing the backend. The only way to set variables is by creating an extension.
This super-short Mini-howto will tell you how to set up this wonderful feature in 5 easy steps. I will assume you have access to your webserver by FTP and can create directories and upload files by FTP.
This is a short overview how it works:
- Set up a folder with images
- Create an extension
- Add 1 line to this extension and point TYPO3 to your image directory
- Install extension
Setting Up the Image Folder
First you have to prepare the images. One image is fine but of course the more the better. The original images are 200x133 pixel in size, I suggest you create some cute images of the same size but it's not necessary. Allowed are png, jpg and gif images.
Log on to your website using your favorite FTP tool. You can also set up a TYPO3 filemount to do the same.
Go to the directory typo3conf/
Create a new empty directory 'logonimages'. (Without quotes)
Copy the prepared images to this folder.
Create the Extension
Click images to enlarge. Image count from top to bottom.
„What? I never created an extension! I can never do this!“ - if that's what you say you're wrong. You can follow detailed instructions – and all we have to write is one single line of code – which you can as well copy from this document if you used the directory from the last step.
Log on to the TYPO3 backend as administrator. Ignore the ugly log on image <(^.^)>
In the Tool menu use „Ext Manager.“ Of course you need to have this module installed. Showing you how to install extensions from the TER (TYPO Extension Repository) is not goal of this Mini-HOWTO.
Chose the item „Make new extension“ from the dropdown menu.
In the field "Enter Extension key" you type "user_enhancelogin". Then click on the button "Update."
Click on the plus symbol next to the line saying „General Info.“ Fill the form like shown in image . Don't forget to hit the "Update" button!
Datei:ExtensionKickstarter01.jpg
In the menu to the left click on the plus symbol next to „Extend existing tables.“ You do not need to type something there. It's just done to create the empty framework for our single line of code.
At the bottom left of the content frame there is a button now saying „View Result.“ Click it. The result will look like that in image [4]. One really, really important note: Before proceeding you need to make sure in the location dropdown "LOCAL" is chosen! If you fail to do so, your extension might show up for all installations and - if installed -might yield in unexpected results.
Now click the "WRITE" button and the raw empty extension is created.
That wasn't too complicated, was it?
Programming
As a result of the last step, a basic framework of extension has been written to the directory /typo3conf/ext/user_enhancelogin/
Now to the programming. Log on to your website using FTP and edit the following file:
typo3conf/user_enhancelogin/ext_tables.php
There are different ways to do this. Most advanced FTP programs have an "edit" button. Please refer to your FTP program's documentation.
Now this is what ext_tables.php should look like. As you can see there is only one line added.
<?php if (!defined('TYPO3_MODE')) die('Access denied.') $GLOBALS['TBE_STYLES']['loginBoxImage_rotationFolder'] =
'../typo3conf/logonimages';
?>
Installing the Extension
After saving the extension there should be a success message and a link to install your new extension. Click it.
In the menu to the left please click the link „Clear temp_CACHED.“ In case you ever wondered what this link is for – this it is.
Log out of the TYPO3 backend and test the setup. If you followed the instructions of this manual you should now see your prepared images instead of the glove.
Suche
Index-Suche – kein eigenes Fenster öffnen
Constants
styles.content.searchresult.resultTarget = _self styles.content.searchresult.target = _self
Domains anlegen
Todo...
Ein Beispiel bei dem zusätzlich Englisch (L=1) berücksichtigt wird.
temp.rootline_html= HMENU
temp.rootline_html.special = rootline
temp.rootline_html.special.range = 0|-1
temp.rootline_html.1 = TMENU
temp.rootline_html.1 {
wrap = Sie sind hier: |
# evt. bestimte Seiten ausblenden...
excludeUidList =
# Sprache mit der ID 1 (Englisch)
target = _top
NO {
linkWrap= <span class="pathway">|</span>
# optionSplit: vor erstem item kein delimiter, sonst immer einer
allWrap = | |*| > | |*|
ATagBeforeWrap = 0
}
}
# Wrap für Englisch
[globalVar = GP:L = 1]
temp.rootline_html.1.wrap = You are here: |
[global]
Mehrsprachigkeit
So baut man mehrsprachige Seiten in Typo3:
Typo3 - Mehrsprachige Navigation
Spracheinstellungen
HTML-Template einbinden
siehe auch: Typo3 - HTML-Templates Beispiel (das page Objekt muß natürlich vorher definiert werden):
Im TS Template Setup:
page.10 = TEMPLATE
page.10{
template = FILE
template.file = fileadmin/templates/main.html
### Subparts ansprechen ###
workOnSubpart = DOCUMENT_BODY
# Rootline (Pathway) einfügen ###
subparts.ROOTLINE < temp.rootline_html
# Hauptinhalt
subparts.CONTENT < layoutWrap
subparts.CONTENT.wrap = <div class="content"> | </div>
#Inhalt rechts
subparts.CONTENT_RIGHT < styles.content.getRight
subparts.CONTENT_RIGHT.wrap = <div class="content"> | </div>
# Rand bzw. Header
subparts.HEADER < styles.content.getBorder
subparts.HEADER <div class="header"> | </div>
# subparts.HEADER < temp.flashHeader
### Hauptnavigation ###
subparts.NAVI_LINKS < temp.navi_gLayer
### rechte Navi ###
subparts.NAVI_RECHTS <temp.naviGRight
}
Einstellungen für das Page Objekt
Verschiedene Einstellungen
statische Seiten Simulieren
Statische Seiten simulieren
config.simulateStaticDocuments = PATH_INFO config.simulateStaticDocuments_addTitle = 30 config.simulateStaticDocuments = 1 config.admPanel = 1 config.simulateStaticDocuments_noTypeIfNoTitle = 1
.htaccess Datei für Apache Server nicht vergessen (muß nur unbenannt werden)
Einstellungen für das Admin Panel
Spamschutz für Email Adressen
config.spamProtectEmailAddresses = 1 config.spamProtectEmailAddresses_atSubst = (at)
E-Mail-Absender für automatische E-Mails z.B. über Kontaktformular
E-Mail-Adresse
plugin.feadmin.dmailsubscription.email = info(at)easy-office4you.de
E-Mail-Name
plugin.feadmin.dmailsubscription.emailName = Barbara Hofbauer
Typo3 RTE - Einstellungen
RTE Absatz Formatierung einstellen
lib.parseFunc_RTE {
nonTypoTagStdWrap.encapsLines.nonWrappedTag >
nonTypoTagStdWrap.encapsLines.wrapNonWrappedLines = |
}
HTML-Area (htmlarea) statt RTE
Mit der Extension htmlarea kann man den RTE ersetzen. Er bietet einiges mehr an Bearbeitungsfunktionen (wenn man die denn will) aber vor allem läuft er auch auf Mozilla, Firefox, etc. Browsern.
htmlarea anpassen
Die Möglichkeiten des htmlarea Editors sind oft zuviel des Guten. Die meisten Anpassungen des RTE funktionieren auch im htmlarea. Beispiele:
Minimale Funktionalität
Im Page Setup:
RTE.default {
## Toolbar options applicable to all RTE's
## The TCA configuration may add buttons to the toolbar
showButtons = bold,italic,undo,redo,about
}
- front end RTE configuration for the general public (htmlArea RTE only)
RTE.default.FE < RTE.default
Header Image austauschen
Typo3 - Header Image austauschen
Schnipsel von http://dokuwiki.intersolution.ch/linux/typo3/typoscript
Typoscript
Template erstellen
- Cachetime nur zu Testzwecken auf 10 Sekunden setzen!!!
config.cache_period = 10
- page Objekt erstellen und Werte zuweisen...
page = PAGE
page {
typeNum = 0
bodyTag = <body bgcolor="#FFFFFF" topmargin="0" leftmargin="0">
meta.AUTHOR = Bruno Staub
meta.DESCRIPTION = Beschreibung der Homepage
stylesheet = fileadmin/styles.css
# Designvorlage integrieren
10 = TEMPLATE
10.template = FILE
10.template.file = fileadmin/vorlage.html
10.workOnSubpart = DOKUMENT
10.marks.DATUM = TEXT
# Datumsausgabe 05.12.2005 - 17:59:10
10.marks.DATUM.data = date : d.m.Y - H:i:s
}
Code Schnipplets
# SEITENTITEL ist ein Platzhalter vom HTML TEMPLATE
# aktueller Seitentitel wird aus pages Tabelle ausgelesen
# wrap umwickelt den Seitentitel fett (Pipe-Symbol erforderlich!)
10.marks.SEITENTITEL = TEXT
10.marks.SEITENTITEL.field = title
10.marks.SEITENTITEL.wrap = |
# x explizite Abrage eines Wertes einer x beliebigen Tabelle (Datensatz ID=1)
10.marks.SEITENTITEL = TEXT
10.marks.SEITENTITEL.data = DB:pages:1:title
# GET- und POST-Variablen abragen
# http://www.intersolution.ch/index.php?id=0&test=Abfragetext
# Falls der Parameter leer ist wird der Seitentitel ausgegeben
10.marks.SEITENTITEL = TEXT
10.marks.SEITENTITEL.data = GPvar : test // field : title
# Bereich marks wird ausgeklammert, dies ermöglicht eine bessere Übersicht
# das Logo wird eingelesen und in der Grössen angepasst und unter typo3temp/pics/ mit kryptischem Namen abgelegt
# typo3temp/pics/ erhält nach jeder grössenänderung ein neues Bild, Abhilfe löschen per ftp und Cache löschen!!!
10.marks {
LOGO = IMAGE
LOGO.file = fileadmin/images/logo.jpg
LOGO.file.width = 178
}
# LOGO dynamisch generieren für Beispielsweise Dummy Trailer Balken
# LOGO Grafik logo.jpg wird über den Dummy Balken gelegt, Ebenenreihenfolge Beachten (10,20,30...)
10.marks {
LOGO = IMAGE
LOGO.file = GIFBUILDER
LOGO.file.XY = 759, 99
LOGO.file.backColor = #697DEE
LOGO.file.10 = fileadmin/images/logo.jpg
LOGO.file.10.file = 178
}
# Text dynamisch generieren mit GIFBUILDER (Wichtig: Eigenschaft .text und nicht .value verwenden!)
MEINTEXT.20 = TEXT
MEINTEXT.20.text = Hallo Welt
CSS styled content
- über den extension Manager System "CSS Styled Content" installieren und unter "include static" from extension
auf Templateebene zuweisen!
CSS styled content gehört zu den System-Extensions. Gehen Sie deshalb in das Verzeichnis \dummy-3.8.0\typo3\sysext\css_styled_content\css\. Dort finden Sie zwei Beispieldateien: example.css und example_outline.css. Die Stylesheets enthalten Formatierungen für alle in TYPO3 enthaltenen Content-Objekte wie Überschriften, Absätze, Listen, Formulare, Sitemap.
Öffnen Sie eine der Dateien und editieren Sie sie nach Ihren Layout-Vorstellungen. Speichern Sie Ihr bearbeitetes Stylesheet unter einem beliebigen Namen in Ihrem Template-Ordner im Fileadmin ab (\dummy-3.8.0\fileadmin\template\).
Anschliessend weisen Sie im Page Template folgenden Code zu:
config {
doctype = xhtml_trans
doctypeSwitch=1
}
page = PAGE
page {
typeNum = 0
bodyTag = <body>
stylesheet = fileadmin/template/mein_stylesheet.css
}
page.20 = TEMPLATE
page.20 {
template = FILE
template.file = fileadmin/template/mein_template.htm
workOnSubpart = DOCUMENT_BODY
}
Möchten Sie mehr als eine Stylesheet-Datei einbinden, benötigen Sie folgende TypoScript Anweisung im Setup:
page = PAGE
page {
typeNum = 0
bodyTag = <body>
includeCSS {
file1 = fileadmin/template/style_1.css
file2 = fileadmin/template/style_2.css
}
}
Konfiguration automaketemplate
Setup:
plugin.tx_automaketemplate_pi1 {
content < plugin.tx_rlmptmplselector_pi1
elements {
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY
HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEADER
HEAD.rmTagSections = title
TD.all = 1
DIV.all = 1
}
relPathPrefix = fileadmin/templates/main/
}
temp.contentAreaTemplate = TEMPLATE
temp.contentAreaTemplate {
template =< plugin.tx_automaketemplate_pi1
// Modify the template selector config: This is a sub template!
template.content.templateType = sub
workOnSubpart = DOCUMENT_BODY
subparts.CONTENT < styles.content.get
subparts.RCONTENT < styles.content.getRight
subparts.LCONTENT < styles.content.getLeft
subparts.BORDER < styles.content.getBorder
}
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
template =< plugin.tx_automaketemplate_pi1
template.content.templateType = main
workOnSubpart = DOCUMENT_BODY
subparts.content < temp.contentAreaTemplate
- subparts.content = CONTENT
- subparts.content < styles.content.get
}
temp.headTemplate = TEMPLATE
temp.headTemplate {
template =< plugin.tx_automaketemplate_pi1
workOnSubpart = DOCUMENT_HEADER
}
page = PAGE
- page.config.incT3Lib_htmlmail = 1
page {
typeNum = 0
bodyTag = <body>
includeCSS {
- file1 = fileadmin/templates/main/res/layout.css
- file2 = fileadmin/templates/main/res/content.css
}
10 < temp.mainTemplate
headerData.10 < temp.headTemplate
}
Container zentrieren
Negative Margin:
body {margin:0px; padding:0px;}
- container-zentrieren {
position:absolute;
left:50%;
width:500px;
margin-top:266px;
margin-left:-300px;
padding:20px;
border:1px dashed #FF0000;
background-color:#e1e1e1e;
}
Auto-width Margins:
body {
margin:20px 0px; padding:0px;
text-align:center;
}
- container-zentrieren {
width:600px;
margin:0px auto;
text-align:left;
padding:20px;
border:1px dashed #FF0000;
background-color:#e1e1e1e;
}
- ggfl. die Maße anpassen
Absatz im Menü
Den Seitentyp "Abstand" wählen und im Seitentitel "& n b s p ;" eingetragen.
Im TypoScript den SPACE (SPC) definieren und im CSS formatieren.
Setup:
1 = HMENU
1.1 = TMENU
1.1 {
expAll = 0
wrap =
|
NO {
linkWrap =
|
}
ACT = 1
ACT {
linkWrap =
|
}
SPC = 1
SPC {
linkWrap =
|
}
}
1.2 = TMENU
1.2 {
expAll = 0
wrap =
|
NO {
linkWrap =
|
}
ACT = 1
ACT {
linkWrap =
|
}
SPC = 1
SPC {
linkWrap =
|
}
}
Ankerpunkt für einen internen Link anlegen
Ein Seitenlelement vom Typ "interner Link" (Shortcut) anlegen, im Pagebrowser den kleinen Pfeil hinter der Seite klicken und das entsprechende Contentelement auswählen.
Konfiguration AWStats
Logfile Konfiguration bearbeiten: awstats_log.txt: www.it-bo.com,it-bo.com
localconf.php: $TYPO3_CONF_VARS["FE"]["logfile_dir"] = "fileadmin/log/";
Setup:
- Konfiguration AWStats
config.stat = 1
config.stat_apache = 1
config.stat_apache_logfile = awstats.txt
config.stat_excludeBEuserHits = 1
config.stat_mysql = 1
config.stat_typeNumList = 0,1,98
Konfigurationsdatei AWStats cc_awstats/awstats/awstats.conf
AWSTATS automatisieren
http://jweiland.net/typo3cms/howto/awstats/
Browsers page title einbinden
Setup:
- Including the class and calling the function
includeLibs.tx_browserpagetitle = typo3conf/ext/browser_page_title/class.tx_browserpagetitle.php
config.titleTagFunction = tx_browserpagetitle->getTitle
- Default language parameters
plugin.browser_page_title {
defaultTitle = IT-Bo - TYPO3 CMS Website DAM Digital Asset Management SEO Reichweitensteigerung Marketing Schulung Hilfe Support - {title}
currentTitle = IT-Bo - TYPO3 - {tx_browserpagetitle_browser_title}
}
- Alternative language parameters
- [globalVar=GP:L=1]
- plugin.browser_page_title.defaultTitle = IT-Bo - TYPO3 CMS Website DAM Digital Asset Management SEO Reichweitensteigerung Marketing Schulung Hilfe Support - {title}
- plugin.browser_page_title.currentTitle = IT-Bo - TYPO3 - {tx_browserpagetitle_browser_title}
- [global]
Content auf allen Seiten einbinden
Setup:
- Content auf allen Seiten einbinden
CONTENT = CONTENT
CONTENT >
CONTENT = RECORDS
CONTENT.tables = tt_content
CONTENT.source = 200
Contentelmente (entfernen)
header - Überschrift
text - Text
textpic - Text m/Bild
image - Bild
bullets - Punktliste
table - Tabelle
uploads - Dateilinks
multimedia - Multimedia
mailform - Formular
search - Suchen
login - Login
menu - Menü/Sitemap
shortcut - Datensatz einfügen
list - Plugin einfügen
html - HTML
script - Skript
splash - Textbox
div - Trenner
- Contentelemente entfernen TSconfig
TCEFORM.tt_content.CType {
removeItems = header,bullets
}
Seitentypen
1 - Standard 2 - Erweitert 3 - Externe URL 4 - Shortcut 5 - Nicht im Menü 6 - Backend Benutzer Bereich 7 - Mount Seite --div-- - Spacer 199 - Abstand 254 - SysOrdner 255 - Papierkorb
- Seitentypen entfernen TSconfig
TCEFORM.pages.doktype {
removeItems = 3,5
}
favicon einbinden
setup:
shortcutIcon = fileadmin/favicon.ico
#favicon setup (alternativ):
headerData.1 = TEXT
headerData.1.value = < link rel="shortcut icon" type="image/x-icon" href="fileadmin/favicon.ico" / >
TYPO3 CSS-Datei einbinden
Setup:
- TYPO3 CSS-Datei einbinden
page {
includeCSS {
file1 = fileadmin/templates/main/res/layout.css
file2 = fileadmin/templates/main/res/content.css
file3 = fileadmin/templates/news/tt_news.css
}
}
Ausschalten der CSS-Formatierung im Seitenkopf der HTML-Datei
Setup:
- Ausschalten der CSS-Formatierung im Seitenkopf der HTML-Datei
#plugin.tx_cssstyledimgtext._CSS_DEFAULT_STYLE =
#plugin.tx_croncssstyledimgtext._CSS_DEFAULT_STYLE =
#plugin.tx_cssstyledcontent._CSS_DEFAULT_STYLE >
plugin.tx_formwidgets_pi1._CSS_DEFAULT_STYLE >
plugin.tx_damdownloads_pi1._CSS_DEFAULT_STYLE >
plugin.tx-sgglossary-pi1._CSS_DEFAULT_STYLE >
#plugin.tx_jphcodesnippets_pi._CSS_DEFAULT_STYLE >
plugin.tt_news._CSS_DEFAULT_STYLE >
CSS auslagern
Setup:
- CSS auslagern
inlineStyle2TempFile = 1
TCEFORM tt_content content header layout altLabels
- TSconfig:
TCEFORM.tt_content.header_layout.altLabels.1 = Überschrift 1
TCEFORM.tt_content.header_layout.altLabels.2 = Überschrift 2
TCEFORM.tt_content.header_layout.altLabels.3 = Überschrift 3
TCEFORM.tt_content.header_layout.altLabels.4 = Überschrift 4
TCEFORM.tt_content.header_layout.altLabels.5 = Überschrift 5
TCEFORM.tt_content.header_layout.altLabels.6 = Überschrift 6
#TCEFORM.tt_content.header_layout.removeItems = 3,4,5
Image Rotation (ric_rotation) Konfiguration
- Setup: Image Rotation (ric_rotation)
plugin.tx_ricrotation_pi1 {
# parser (dont change this)
parser < tt_content.text.20.parseFunc
# template for plugin
templateFile = EXT:ric_rotation/pi1/template.htm
# list of page ids where the banners should be taken from ( comma seperated f.E.: 1,5,7)
pidList =
# levels of recoursion to search for banners
recursive = 0
# show banners with this attribute, options are: top, left, bottom, right
placement = top
#mode to show banners, options are: all, random
mode = all
# how many banner maximum
results_at_a_time = 100
# image preconfig
image {
file.maxW = 492
#file.params = -quality 90 // activate to force quality 90
#file.ext = jpg // activate to force jpg
}
}
Konfiguration Indexed Search
Constants:
- Suche Indexed Search
plugin.tx_indexedsearch {
search.rootPidList = 1
show.rules = 0
}
Setup:
- Indexierung
config.index_enable = 1
config.index_externals = 1
Konfiguration Macina Searchbox
Setup:
- Konfiguration Macina Searchbox
plugin.tx_macinasearchbox_pi1 {
pidSearchpage = 1
templateFile = fileadmin/it-bo/macina-searchbox.html
}
Macina Searchbox einbinden
Setup:
- Macina Searchbox einbinden
SUCHE >
SUCHE < plugin.tx_macinasearchbox_pi1
Javascript auslagern
Setup:
- Javascript auslagern
removeDefaultJS = external
- Constants: MOC Fileshare manager, moc_filemanager
plugin.tx_mocfilemanager_pi2.documentRoot = fileadmin
plugin.tx_mocfilemanager_pi2.useOwnIcons = 0
plugin.tx_mocfilemanager_pi2.limitNewest = 5
plugin.tx_mocfilemanager_pi2.ShowFilesPID = 123
- plugin.tx_mocfilemanager_pi1.mountWrap = |
- plugin.tx_mocfilemanager_pi1.parentDirStyle = 1
- plugin.tx_mocfilemanager_pi1.showParentDir = 1
plugin.tx_mocfilemanager_pi1.documentRoot = fileadmin
- plugin.tx_mocfilemanager_pi1.disableMkdir = 1
- plugin.tx_mocfilemanager_pi1.ApacheChildKill = 1
- plugin.tx_mocfilemanager_pi1.timeLimit = 0
plugin.tx_mocfilemanager_pi1.useDescriptions = 1
- plugin.tx_mocfilemanager_pi1.asExplorer = 1
plugin.tx_mocfilemanager_pi1.allowedExts = txt,xls,doc,pps,gif,jpg,htm,html
- plugin.tx_mocfilemanager_pi1.datetimeFormat = %c
- plugin.tx_mocfilemanager_pi1.maxDepth = 1
plugin.tx_mocfilemanager_pi1.useOwnIcons = 1
Konfiguration Link2Map24
link2map24:
- bei map24 (link2map24) anmelden
link2map24.tpl.html:
<<<< USERID >>>> von link2map24 eintragen
News tt_news
News Template einbinden
Constants:
- News tt_news Template einbinden
plugin.tt_news {
file.templateFile = fileadmin/templates/news/tt_news.html
}
News Datum- und Zeitformat anpassen
Setup:
- News tt_news Datum- und Zeitformat anpassen
plugin.tt_news {
archiveTitleCObject {
10.strftime = %B - %Y
}
getRelatedCObject {
20.strftime = %d.%m.%Y %H:%M
}
displaySingle {
- date_stdWrap.strftime= %d.%m.%y
date_stdWrap.strftime= %A, %d. %B %Y
time_stdWrap.strftime= %H:%M
}
displayLatest {
date_stdWrap.strftime= %d.%m.%y
time_stdWrap.strftime= %H:%M
}
displayList {
# date_stdWrap.strftime= %A %d. %B %Y
date_stdWrap.strftime = %A, %d. %B %Y
time_stdWrap.strftime= %d.%m.%y %H:%M
}
}
Konfiguration rlmptmplselector
Setup:
- definiert den Pfad zu den Main-Template Dateien
plugin.tx_rlmptmplselector_pi1.templatePathMain = fileadmin/templates/main/
- definiert legt den Pfad zu den Main-Template Dateien
plugin.tx_rlmptmplselector_pi1.templatePathSub = fileadmin/templates/sub/
- definiert das Standard Main-Template Datei, welches geladen werden soll, wenn kein anderes Template ausgewählt wurde
plugin.tx_rlmptmplselector_pi1.defaultTemplateFileNameMain = main_rlmptmplselector.html
- definiert das Standard Sub-Template Datei, welches geladen werden soll, wenn kein anderes Template ausgewählt wurde
plugin.tx_rlmptmplselector_pi1.defaultTemplateFileNameSub = sub_rlmptmplselector.html
- If there is a page having no template selected, use a template
- selected earlier in the rootline. If there is none, use the default
plugin.tx_rlmptmplselector_pi1.inheritMainTemplates = 1
plugin.tx_rlmptmplselector_pi1.inheritSubTemplates = 1
TOP Link
- Setup TOP Link
TOPLINK = TEXT
TOPLINK {
value = to top
lang.en = To the Top
lang.de = Seitenanfang
wrap = <A HREF="#top" class="top-link">|</A>
}
Überschrift als Grafik
Im Install Tool (Installation) unter "All Configuration" "[gdlib_png]" aktivieren.
- Setup Überschrift als Grafik
Header1 = IMAGE
Header1 {
wrap = |
file = GIFBUILDER
file {
XY = [10.w]+6,00
transparentColor = # Hintergrundfarbe
backColor = # Hintergrundfarbe
10 = TEXT
10.text.field =
10.text.current = 1
10.fontSize = Schriftgröße
10.offset = 0,50
10.fontFile = fileadmin/schriftart.ttf
10.fontColor = Schriftfarbe
10.niceText = 1
}
}
lib.stdheader.10.1 < Header1
Konfiguration 404 Error Site
Eigene Fehlerseite (404 Error Site) mit der Extension error_404_handling erstellen
Der Browser zeigt die normale Fehlerseite an, die einen 404 Fehler zurück gibt: 404 Error Site.
Für eine eigene 404 Error Site, muss die Extension error_404_handling installiert werden.
Im Ordner /typo3conf/ext/error_404_handling/files/ befinden sich die Dateien für die eigene 404 Error Site.
Dateien:
- 404page_not_found.php
- example.htaccess
Die Datei "404page_not_found.php" in das Root-Verzeichnis der Domain kopieren. Und aus der example.htaccess Datei folgendes in die .htaccess Datei der Root-Ebene eingefügen:
ErrorDocument 404 /path_anpassen/404page_not_found.php
ErrorDocument 500 /path_anpassen/404page_not_found.php
Im Install-Tool [warning_email_addr] kann eine E-Mail-Adresse eingeben. Dann wird eine E-Mail versendet, wenn eine Seite (404 Error Site) nicht gefunden wurde.
Einen Domainrecord anlegen bzw. öffnen und eine URL in dem Feld "Redirect to an URL if a page or file under this domain could not be found" eintragen.
404 Error Site: Umleitung auf eine bestimmte 404 Error Site
Install:
$TYPO3_CONF_VARS["FE"]["pageNotFound_handling"] = 'http://www.404-Error-Site.com/404.php';
TYPO3 YAML
TYPO3 YAML Beispielseite und Anleitung
YAML, TYPO3 und YAML
Download: yaml.t3net.de
Syntax Highlighting Ultraedit
Da mir die durchgehend schwarze Schrift des typoscript total auf den Senkel geht, und ich keinerlei adäquate Lösung zum Thema TypoScript Syntax Highlighting bzw. Syntax kontrolle etc. gefunden habe, hab ich mir das wordfile vom Ultraedit www.ultraedit.com mal hergenommen und erweitert!
http://www.typo3.net/forum/list/list_post//21624/
Bedingungen definieren
marks.SLOGAN = COA
marks.SLOGAN {
10 < temp.import_img
stdWrap.ifEmpty.cObject < temp.std_img
}
http://lists.netfielders.de/pipermail/typo3-at/2004-October/003731.html
http://www.jweiland.net/typo3cms/howto/typoscript-bedingung/
http://www.typo3.net/tsref/functions/if/
http://www.typo3.net/tsref/functions/stdwrap/
http://linuxwiki.de/Typo3TypoScript
Links
http://www.it-bo.com/typo3-marketing/hilfe/container-zentrieren.html
http://ug.typo3-nrw.de/typo3-dynamic_css.html
http://www.typo3.net/index.php?id=13&action=list_post&tid=39948&page=1
http://blog.dopefreshtight.de/artikel/typo3-aufsetzen-setup/
http://www.sk-typo3.de/RTE-Standardkonfiguration.31.0.html
http://www.linet-services.de/t3_tscode.html
http://www.it-bo.com/typo3-marketing/news/typo3-news/article/typo3-yaml-fuer-version-4.html
http://www.typo3-unleashed.net/index.php?id=sitemap
http://www.sk-typo3.de/Typo3-Extensions.68.0.html
http://www.contentschmiede.de/links-zu-typo3/
http://www.mcuniverse.com/TemplaVoila_-_Cheat_Sheet.1221.0.html
http://www.just2b.com/mein-typo3/css-ts-menues.html
http://ww2.sprain.ch/index.php?id=19
http://www.typo3wizard.com/de/snippets/menus/text-menu-tmenu.html
http://lists.netfielders.de/pipermail/typo3-german/2006-January/008630.html
http://82.165.8.199/typo3cms/exotec-design.de/index.php?id=89