Menu

News

Monday 20. of November 2006 Speed up PHP5 and Mysql on osx

Friday 01. of September 2006 New version of phpadsnew

Wednesday 26. of July 2006 Me and my macBook

Saturday 03. of June 2006 Advanced pop-up and acronym manager

Site Sponsors

Advertise using Text-Link-Ads

CMS Solutions

System CMS

 

Foro Apple

Foro Apple

 

Cocktails

Cocktails of the World

of the world!

Want to advertise here?

Single page or site-wide advertisements. Gain your PR with back-links from a high ranked site.

Click here to request more information

Typoscript Object Tags

Typoscript object tags are a method of putting Typoscript Object IN your text as written in the RTE.

For this I want to start right away with a little example:
This text: is written directly into the RTE and the image is automaticly created!

Or we can re-use the object like this:

How is this done?
We use a basic Typoscript Setup for it that looks like this:

gifbtext = IMAGE
gifbtext {
    alttext.cObject = TEXT
    alttext.cObject.field = header
    file = GIFBUILDER
    file {
        format = gif
        reduceColors = 8
        transparentColor = #f6f2ea
        XY = [10.w]+2,[10.h]+2
        backColor = #f6f2ea
        10 = TEXT
        10 {
            text = Ries van Twisk
            fontSize = 15
            fontColor = #280505
            offset = 0,14
            fontFile = fileadmin/templates/fonts/edwastic.ttf
        }
    }
}

The code for the first example looks like this :
This <tsobj_ gifbtext>gifbtext.file.10.text = R. van Twisk</tsobj_> is written directly into the RTE and the image is automaticly created!

As you can see I can insert the Typoscript Object with the name gifbtext directly into my text.

The code for my second example looks like this:
<tsobj_ gifbtext>gifbtext.file.10.text = Ries welcomes Kaspers new baby!//gifbtext.file.10.fontColor = green</tsobj_>

You can use // to seperate two lines of typoscript code which will be merged into the TypoScript during processing. By doing this you can re-use Typoscript Templates with only the needed changes.

IMPORTANT!: You need to remove the underscore _ from the line tsobj otherwise it will not work!! I had to write it down like this because my tags are processed otherwise.

An Date Time Example

An other example would be to insert the current this like this :
This example is taken from Marlies as shown here : Current Date in Typoscript

This is my typoscript Code:

currentDate = TEXT
currentDate {
   data = date:U
   strftime = %A, %e %B %Y
}

As marlies correcly explain you need to setup markers to show the current date on the screen, no flexebility and no way to use it again as shown again like I just did!

So how this the code look like?

The current Date is :<t sobj currentDate></t sobj> as of today!

As you can see it's extreemly simple to inject Typoscript now between your tags and re-use them.

Download and test!

23 April 2006: I uploaded the extension inclusing an Open Office document to TER. You can find it here : Opens external link in new windowhttp://typo3.org/extensions/repository/search/rvt_tsobjtags/0.0.1/

If you like the extension then I would appriciate if you put a link to my site, or to help me Opens internal link in current windowsponsoring a new lap-top since my old one is broken.

How in the RTE

rtehtmlarea sets this as default : RTE.default.proc.entryHTMLparser_db.keepNonMatchedTags = protect
It means that you can enter your own tag in the RTE WYSIWYG mode as if you are typing HTML code. And it works out of the box as shown above.

ries(at)vantwisk.nl

This document was generated on and ofcourse using the tsobj method!