Zum Inhalt springen

Archiv für "Typoscript"

TYPO3 6.2 content image in Typoscript

Here are a few lines of TypoScript code that really took me a long time to get to.

In TYPO3 4.x, I would fetch an image which is inserted on a certain page as a normal content element (CE) and use it for example as an site wide header image.
In this example, the image in question is located in the backend column 'left' (id 1) on the root page of the site, the PID of that page is stored in a TS-variable {$home_dir}, since I change it further down the page tree via TS-constants.
TYPO3 4.x
temp.headerimg < styles.content.getLeft
temp.headerimg {

(The Pains of) Displaying Random Content Records with Typoscript

Drüben auf welearned.net habe ich beschrieben, wie schnell einem bei TYPO3/Typoscript der Nerv und die Zeit davonlaufen kann und eine vermeindlich einfache Aufgabe zur echten Kopfnuss wird.

(The Pains of) Displaying Random Content Records with Typoscript

Sometimes TYPO3, the mighty opensource Content Management System with a large community in Europe, drives me crazy. It really is a Love/Hate relationship we're having. I love the fact that you can get everything done with TYPO3 and I hate the fact that sometimes it's so damn complicated to get things done with TYPO3, not the least because of Typoscript (TS) -- the 'interpreter' between the underlying PHP-core and the setups in TYPO3.

Even with more than 5 years of building medium and large sites for several clients with TYPO3 on my back, I occasionally run in a situation where a seemingly simple task unfolds as a frustrating venture and eats on budget and time and eventually takes toll on my sanity.
Usually it turns out that there's a problem in my initial idea, a logic flaw, or a not-so-well-thought-of underlying structure, but since it is really really hard to keep track of all the "functions" that come with Typoscript, and debugging the rendering process is even harder, sometimes working with TS is anything but fun.

TYPO3: HTML-Seitentitel per Typoscript mit Rootline ausgeben

Mal ein kleiner TS-Schnibbel, weil ich das gerade für ein Kundenprojekt gebraucht habe…
Statt dem normalen Seitentitel soll der Pfad zur Seite im title-Tag erscheinen.

Mit Typoscript dafür sorgen, dass der normale title-Tag nicht ausgegeben wird,
ein Rootline Menu in als temporäres Objekt erzeugen aber ohne Verlinkung und sonstiges Markup,
dieses dann mit title-Tags versehen in den Seiten-Head ausgeben.

# normales title tag unterdruecken:
config.noPageTitle = 2
# rootline-menu bauen:
temp.rl = HMENU
temp.rl {
special = rootline
# range: ab Rootlevel (0) bis...
special.range = 1|-1
1 {
# keine links erzeugen