Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering TypoScript: TYPO3 Website, Template, and Extension Development
Mastering TypoScript: TYPO3 Website, Template, and Extension Development

Mastering TypoScript: TYPO3 Website, Template, and Extension Development:

eBook
$35.98 $39.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Mastering TypoScript: TYPO3 Website, Template, and Extension Development

Chapter 1. Introduction to TypoScript

TYPO3 is one of the most popular Content Management Systems in use today. This is hardly surprising, given that it can handle large web projects comfortably. However, if you want to have control not only over the content but also the design and functionality of your online presence, you require a good knowledge of TypoScript. This book introduces you to TypoScript and shows you how to create templates, generate menus and frames, and prepare your website for search engines.

Prerequisites

This book is targeted at experienced TYPO3 users and is meant to help you primarily during your day-to-day work. However, before you start with TypoScript, we must clarify the selection of packages and extensions that need to be installed to use this book. It does not matter in principle which TYPO3 package you have installed—TypoScript can be learned with any package. The following instructions are based on an installed dummy package.

Dummy Package

You of course want to use TypoScript for your own projects. As already mentioned, it does not matter in principle which TYPO3 package you have installed. However, for starting out with TypoScript the dummy package is recommended—you get an empty database and can experiment with TypoScript as much as you want. The installation of the dummy package is not shown here. You can download the dummy package from http://typo3.org/1274.0.html.

Setting up an Example Page Structure

You have bought this book to learn to use TypoScript in your own projects. Here TypoScript is explained using small independent examples, so that the book serves as a reference without you having to work through a large example or case study. However, some topics, such as the template auto-parser can only be explained with the help of a detailed example page structure. So in order to avoid having to define a new example each time in such cases, the following steps define a specific one. You can use the book quite well even if you don't use this example structure; however it makes things easier. The time spent on creating the example pages is less than 5 minutes.

First right-click TYPO3 and point to New. In the right frame New record click on Page (inside):

Give this page a title (e.g. Index); disable the Hide page checkbox in the upper area of the window and save the page.

Call the Index page and click on Functions in the left menu. Make sure that the Create multiple pages wizard is selected in the drop-down list as pages can be created quite easily using this wizard.

All you have to do is to enter the desired page titles.

The pages are created via the Create pages button. You can inspect the results immediately in the page tree.

You can now assign sub-pages to the newly created pages. To do this, point to About Us, select the Create multiple pages wizard again, and create a few sub-pages.

Repeat these steps for additional pages. The result should look like this in the page tree:

That's it. You can always build on this sample installation and keep coming back to it.

Prerequisites


This book is targeted at experienced TYPO3 users and is meant to help you primarily during your day-to-day work. However, before you start with TypoScript, we must clarify the selection of packages and extensions that need to be installed to use this book. It does not matter in principle which TYPO3 package you have installed—TypoScript can be learned with any package. The following instructions are based on an installed dummy package.

Dummy Package

You of course want to use TypoScript for your own projects. As already mentioned, it does not matter in principle which TYPO3 package you have installed. However, for starting out with TypoScript the dummy package is recommended—you get an empty database and can experiment with TypoScript as much as you want. The installation of the dummy package is not shown here. You can download the dummy package from http://typo3.org/1274.0.html.

Setting up an Example Page Structure

You have bought this book to learn to use TypoScript in your own projects. Here TypoScript is explained using small independent examples, so that the book serves as a reference without you having to work through a large example or case study. However, some topics, such as the template auto-parser can only be explained with the help of a detailed example page structure. So in order to avoid having to define a new example each time in such cases, the following steps define a specific one. You can use the book quite well even if you don't use this example structure; however it makes things easier. The time spent on creating the example pages is less than 5 minutes.

First right-click TYPO3 and point to New. In the right frame New record click on Page (inside):

Give this page a title (e.g. Index); disable the Hide page checkbox in the upper area of the window and save the page.

Call the Index page and click on Functions in the left menu. Make sure that the Create multiple pages wizard is selected in the drop-down list as pages can be created quite easily using this wizard.

All you have to do is to enter the desired page titles.

The pages are created via the Create pages button. You can inspect the results immediately in the page tree.

You can now assign sub-pages to the newly created pages. To do this, point to About Us, select the Create multiple pages wizard again, and create a few sub-pages.

Repeat these steps for additional pages. The result should look like this in the page tree:

That's it. You can always build on this sample installation and keep coming back to it.

Declarative Programming with TypoScript


The name TypoScript is confusing. TypoScript is not a classical script, let alone a programming language in the usual sense. It cannot even be classified as a descriptive language similar to HTML. What then is TypoScript? To answer this question you must take a look at the basic principle of all Content Management Systems—content and layout must be separated from each other and can be manipulated through templates and stylesheets. Tags that are dynamically replaced by the CMS's content are preferred. The type of tag varies mostly between<Tag> and {Tag}, but the principle is always the same.

But TYPO3 doesn't stop here—because of the ability to create the complete output template with TypoScript, the developer has full control over the layout. The influence of this template on the final design in comparison to normal HTML templates is disproportionately higher.

Then what is TypoScript? The statement that it is not a programming language is not entirely true, since TypoScript, strictly speaking, can be regarded as a declarative programming language. TypoScript is a tool with which you specify what the output of the website and/or TYPO3 will look like. In contrast to a true programming language, you simply use TypoScript to describe the look of the result; the actual path to the solution is not programmed.

The Power of TypoScript


Unlike many other CMSs, TypoScript goes much beyond allowing you to integrate dynamic contents. Thanks to TypoScript, JavaScript-based menus, Flash, Graphics, etc. can be integrated with ease. You have maximum control over the design of the website and can control all options that would otherwise be addressed by HTML—simple text output, formatting, and much more. TypoScript also allows you to generate graphics at run time and the display of content can be changed according to the time of day or the user group.

What does this multiplicity of functions mean to you? To begin with it saves you time learning TypoScript. Even though TypoScript is only a declarative programming language, you first have to get familiar with the syntax. Luckily, TypoScript is not as complex as PHP or Java. Although the ambitious TYPO3 developer may find this to be a limitation in some areas, this reduces potential errors. If you have developed complex menus via JavaScript, you know about the problems that crop up until the menu finally works reliably. For example, take a look at a really simple drop-down menu as used on numerous websites.

<script type="text/javascript"> <!--
function MM_jumpMenu(targ,selObj,restore)
{ //v3.0 eval(targ+".location='"+selObj.options[selObj. selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script>
<form name="demo" method="post" action=""> <select name="themes" onChange="MM_jumpMenu('parent',this,0)"> <option selected>Please choose!</option> <option value="page_one.html">Page 1</option> <option value="page_two.html">Page 2</option> <option value="page_three.html">Page 3</option> <option value="page_four.html">Page 4</option> </select> </form>

This example illustrates some of the aspects and problems of JavaScript menus. If you want to create this type of menu, you have to understand JavaScript. Furthermore, you must have experience as to what browser the syntax works with and how to compensate for functions that create errors in others. Don't forget that this is a really simple example. When we approach dynamic websites, the effort and the likelihood of errors increase. If, for example, you want to provide semi-transparent navigation using graphics and layers, you have to have a thorough knowledge of HTML, DHTML, and JavaScript. The size of such scripts quickly bloats up to several hundred lines. It therefore takes some time before everything is running properly. The debugging adds to the difficulties. How does TypoScript circumvent these? What are its strengths? Take a look at the following menu:

page.10.marks.MENU.1 = GMENU page.10.marks.MENU.1.expAll = 1 page.10.marks.MENU.1.NO
{ backColor = #000000 XY = 100, 20 10 = TEXT 10.text.field = title 10.fontColor = #ffffff 10.offset = 4,14 10.fontFile = fileadmin/verdana.ttf 10.fontSize = 11 wrap = | <br /> } page.10.marks.MENU.2 = GMENU page.10.marks.MENU.2.NO
{ backColor = #c0c0c0 XY = 100, 20 10 = TEXT 10.text.field = title 10.fontColor = #ffffff 10.offset = 4,14 10.fontFile = fileadmin/verdana.ttf 10.fontSize = 10 wrap = | <br /> }

This is how menus are created in TypoScript. The example shown is representative of the size of scripts that create menus. Even graphical menus can be created with scripts of this length and the syntax is much simpler than that of JavaScript.

Obviously menus are not the only area where TypoScript helps developers. Have you ever used PHP to create run time graphics? The experienced PHP developer doesn't usually have a problem with this, but the creation of a corresponding script requires a lot of development and testing time. With TypoScript this is no problem even for those with no PHP experience.

What is TypoScript?


Obviously TypoScript is not a normal programming or scripting language, and yet is very powerful. So how do we ultimately classify TypoScript? TypoScript can be used to configure TYPO3; it can thus be described as a configuration language for which no programming knowledge is necessary. In contrast to true programming or scripting languages, TypoScript lacks elements (such as loops) that are typical of such languages. In fact, TypoScript consists of configuration instructions that are incredibly simple in structure and are reminiscent of CSS in their simplicity (with respect to their syntax and not the effect).

How TypoScript is structured can be seen with the help of the TypoScript Object Browser tool. For this, go to Web | Template and select the TypoScript Object Browser menu from the drop-down list.

Here you can see the TypoScript objects in a clear tree structure. You will learn more about the TypoScript Object Browser and the objects on the following pages.

Back-end Configuration with TypoScript


Using so-called TSConfig instructions you can personalize the back-end for individual users or user groups. For instance, certain modules can be masked out in a user's working environment. For a different user one can, in turn, deactivate single options in a checkbox list. The entire back end can be controlled this way and be customized to the needs of the respective editors.

TypoScript and PHP


We have already pointed out that TypoScript is programmed in PHP. However, you do not have to know PHP syntax to be able to work with TypoScript; but knowledge of PHP is definitely an advantage. You can, for example, easily import information from the PHP class files using appropriate objects and values. The following example will show how this works.

Anyone who wants to know more about the structure and the development (from a programming point of view) of TypoScript should take a look at the tslib directory. It contains the PHP classes that control TypoScript.

For a better understanding open the file typo3/sysext/cms/tslib/class.tslib_content.php. You will find numerous PHP functions in it. We will concentrate on the CTABLE() function.

function CTABLE ($conf)
{ $controlTable = t3lib_div::makeInstance('tslib_controlTable'); if ($conf['tableParams'])
{ $controlTable->tableParams = $conf['tableParams']; } // loads the pagecontent $controlTable->contentW = $conf['cWidth']; // loads the menues if any if (is_array($conf['c.']))
{ $controlTable->content = $this->cObjGet($conf['c.'],'c.');
$controlTable->contentTDparams =isset($conf['c.'] ['TDParams']) ? $conf['c.']['TDParams'] : 'valign="top"'; } if (is_array($conf['lm.']))
{ $controlTable->lm = $this->cObjGet($conf['lm.'],'lm.'); $controlTable->lmTDparams = isset($conf['lm.'] ['TDParams']) ? $conf['lm.']['TDParams'] : 'valign="top"'; } if (is_array($conf['tm.']))
{ $controlTable->tm = $this->cObjGet($conf['tm.'],'tm.'); $controlTable->tmTDparams = isset($conf['tm.'] ['TDParams']) ? $conf['tm.']['TDParams'] : 'valign="top"'; } if (is_array($conf['rm.']))
{ $controlTable->rm = $this->cObjGet($conf['rm.'],'rm.'); $controlTable->rmTDparams = isset($conf['rm.']
['TDParams']) ? $conf['rm.']['TDParams'] : 'valign="top"'; } if (is_array($conf['bm.']))
{ $controlTable->bm = $this->cObjGet($conf['bm.'],'bm.'); $controlTable->bmTDparams = isset($conf['bm.'] ['TDParams']) ? $conf['bm.']['TDParams'] : 'valign="top"'; }
return $controlTable->start($conf['offset'], $conf['cMargins']); }

Thanks to this function, elements can easily be positioned with the help of a table. What does this mean for TypoScript? To understand this take a look at the following syntax, which uses the Content Object (cObject) CTABLE:

page = PAGE page.10.marks.TABLE = CTABLE page.10.marks.TABLE { tableParams = width="800" border="0" cellpadding="3" cellspacing="0" offset = 0,0,0,0,0 cMargins = 15,15,15,15 rm.TDParams = width="100" valign="bottom" tm.TDParams = width="300" valign="bottom" lm.TDParams = width="300" valign="bottom" bm.TDParams = width="100" valign="bottom" c.TDParams = width=80% c.10 < styles.content.get tm.10 = HMENU tm.10.1 = TMENU tm.10.1 { NO.allWrap = | target = page }
}

Using page.10.marks.TABLE, a new TypoScript object of the CTABLE type is defined. Using TypoScript, the remaining lines define the look and the content of the table. You are surely familiar with the HTML layout attributes; TypoScript's own attributes such as HMENU etc. will be shown later. Note that you will need templates and placeholders to get this example to work. More information on these can be found in Chapter 4 and Chapter 5. The output of this example is shown below:

If you want to work more closely with the PHP functions, take one function after another and experiment with it. You will gradually understand how the meshing between TypoScript and PHP works. At the same time you also have an opportunity to learn about the weaknesses of TypoScript. Each TypoScript object can only deliver what the programmer has designed into the respective function (except when you develop your own functions).

The core of TypoScript is the typo3/sysext/cms/tslib/index_ts.php file. It charts the information about the template datasets of the website tree. How this works is shown by the following TypoScript:

page = PAGE page.typoeNum = 0 mybicycle.color = blue mybicycle.size = 26

This syntax creates the TypoScript object mybicycle. You assign the properties color and size to the mybicycle object. These two properties in turn are assigned the following values: color becomes blue and size gets the value 26. In the TypoScript Object Browser you will see objects, properties, and values represented as follows:

PHP can also be used directly in TYPO3; we will cover more about this later.

TypoScript Templates


You will get a detailed introduction to TypoScript templates in the next chapter. At this point we want you to simply make an initial contact. If one wants to describe a template, the word 'mould' immediately comes to mind. A template is simply nothing more than a master that is used over and over. Templates determine how the content that is entered by the editor and stored in the database will be displayed on the website. To put it bluntly, you can enter as much as you want into the database—TYPO3 will not be able to display it in the front end without templates. You can check this out with an easy experiment. As an experienced TYPO3 user you have no doubt encountered the error message Error: No pages are found on the rootlevel. This message tells you that no page has been created yet for the current project. The following message, however, is rarer:

When this error message appears all the time in the front end you have to create a template before any content can be displayed. In Chapter 5 you will learn how this works, what template inheritance is, and what peculiarities you need to be aware of when creating templates.

TYPO3 offers ready-made templates to make your work easier for most areas of application. You don't have to develop a new template each time you want to create a link, for example. However, the focus in this book is on the development of your own templates. This will help you create an appropriate solution for each and every application.

Without spending too much time on templates at this time, we want to make the following observations:

  • Templates contain information that describes a website precisely.

  • Cache, frame layout, content, and HTML header instructions are controlled through templates during the generation of the output.

  • A page can contain several templates.

  • Inheritance (cascading) plays an important role in templates. Templates are always passed on to subordinate pages.

You now have an idea of how powerful templates are and what possibilities they offer. In a nutshell, the quality of a TYPO3 website depends on the quality of its templates.

Summary


In this chapter we provided an introduction to TYPO3 and the prerequisites for installing it. We set up an example page structure that we will use in the examples throughout this book.

We then introduced TypoScript, a configuration language for which no programming knowledge is necessary. In contrast to true programming or scripting languages, TypoScript lacks elements (such as loops) that are typical of such languages. In fact, TypoScript consists of configuration instructions that are incredibly simple in structure.

We wound up with an introduction to TypoScript templates.

Left arrow icon Right arrow icon

Key benefits

  • Powerful control and customization using TypoScript
  • Covers templates, extensions, admin, interface, menus, and database control
  • You don't need to be an experienced PHP developer to use the power of TypoScript

Description

Free, open-source, flexible, and scalable, TYPO3 is one of the most powerful PHP content management systems. It is well suited for creating intranets and extranets for the enterprise. While providing an easy-to-use web interface for non-technical authors and editors of content, its messaging and workflow system enable shared authoring and collaboration. TYPO3 provides flexible and powerful interfaces for both content editors and administrators, giving them full control of the core aspects the system. However for developers who need to customize the system, TYPO3 offers a powerful configuration language called TypoScript. Good knowledge of TypoScript is really a prerequisite for implementing complex applications with TYPO3 and gives developers full control over the configuration of TYPO3 and its template engine. TypoScript enables the complete output template to be created and manipulated, giving you full control over the layout of the site. TypoScript also allows you to integrate dynamic contents, JavaScript-based menus, Flash, Graphics, etc. with ease. You have maximum control over the design of the website and can control all options that would otherwise be addressed by HTML-simple text output, formatting, and much more. TypoScript also allows you to generate graphics at run time and display different content dynamically.

Who is this book for?

This book is suitable for TYPO3 developers, administrators, and designers who want to develop fully featured TYPO3 websites using the power of TypoScript. A basic knowledge of TYPO3 is expected, and PHP and MySQL programming experience is useful, though not essential for using this book

What you will learn

  • Design and develop templates in TYPO3ñdesign templates, pure TypoScript templates, and TemplaVoila
  • Develop extensions in TYPO3; build extensions using Kickstarter
  • Understand the objects, properties, operators, and data types in TypoScript
  • Use and customize different text editors like HTMLAreaRTE and Rich-Text-Editor
  • Understand the entire TYPO3 back end, including the Info/Modify tool, the Object browser, the Template Analyzer, and the TypoScript Properties display
  • Edit the front end using the Admin panel
  • Work with design templates using markers, subparts, and HTML comments
  • Understand how to present different views of content with different menu entry types
  • Understand TYPO3 database structure and query it using SQL
  • Use user groups to distribute the editing and management of content on your site
  • Customize the back end with Page TSConfig and User TSConfig
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 22, 2006
Length: 404 pages
Edition : 1st
Language : English
ISBN-13 : 9781904811978
Vendor :
TYPO3 Association
Languages :
Concepts :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Dec 22, 2006
Length: 404 pages
Edition : 1st
Language : English
ISBN-13 : 9781904811978
Vendor :
TYPO3 Association
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 98.98
Mastering TypoScript: TYPO3 Website, Template, and Extension Development
$54.99
Learning jQuery, Third Edition
$43.99
Total $ 98.98 Stars icon

Table of Contents

14 Chapters
Introduction to TypoScript Chevron down icon Chevron up icon
Getting to Know TypoScript Chevron down icon Chevron up icon
Tools and Editors Chevron down icon Chevron up icon
Design Templates Chevron down icon Chevron up icon
Templates Chevron down icon Chevron up icon
Working with Graphics Chevron down icon Chevron up icon
Menus Chevron down icon Chevron up icon
Frames Chevron down icon Chevron up icon
Forms Chevron down icon Chevron up icon
TypoScript and SQL Chevron down icon Chevron up icon
Extensions Chevron down icon Chevron up icon
Barrier Freedom Chevron down icon Chevron up icon
Fine Tuning Chevron down icon Chevron up icon
Customizing the Back End with TSConfig Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6
(5 Ratings)
5 star 80%
4 star 0%
3 star 20%
2 star 0%
1 star 0%
Nathan Smith Apr 30, 2007
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Few systems, retail or open source, are as powerful as TYPO3. More than just a typical CMS, it is a complete web application framework. Part of what makes it so popular is the extensibility, allowing developers to create additional functionality. However, TYPO3 is not without its drawbacks. It has a notoriously difficult learning curve, and the admin area leaves quite a bit to be desired as far as usability. TYPO3 has taken off in Europe, winning multiple awards. In the USA though, it has yet to gain a foot-hold.That is, except for the Web Empowered Church, which uses TYPO3 as the CMS and framework of choice for building church websites. My two latest freelance clients have been two churches with thousands of attendees each week. Each of them makes use of the WEC extensions written for TYPO3, via TypoScript.So, now that we have a background on what TypoScript is exactly, let's talk about the book Mastering TypoScript. It was written by Daniel Koch, then translated from the original German version to English by Wolfgang Spegg. It presupposes familiarity with TYPO3 and PHP, delving right away into the guts of the system. Here's what I gleaned from the book...SyntaxThe first chapter begins with an introduction of TypoScript which, true to the similarity in name, is somewhat reminiscent of JavaScript. The way that variables and properties are defined looks a bit like JS dot notation and object literal declaration. By way of comparison, here is how JavaScript and TypoScript might look if constructing an object named mustang.JavaScript - dot notation:// Create empty object: "mustang"// and then add properties to it.var mustang = {}; mustang.manufacturer = 'Ford'; mustang.build = 'American'; mustang.category = 'sport'; mustang.doors = 2; mustang.passengers = 4;JavaScript - object literal:var mustang = { 'manufacturer' = 'Ford'; 'build' = 'American'; 'category' = 'sport'; 'doors' = 2; 'passengers' = 4;};TypoScript - dot notation:mustang = CARmustang.manufacturer = TEXTmustang.manufacturer.value = Fordmustang.build = TEXTmustang.build.value = Americanmustang.category = TEXTmustang.category.value = sportmustang.model = TEXTmustang.doors = 2mustang.passengers = 4TypoScript - object literal:mustang = CARmustang { manufacturer = TEXT manufacturer.value = Ford build = TEXT build.value = American category = TEXT category.value = sport model = TEXT doors = 2 passengers = 4}As you can see from the above examples, while the syntax is similar, TypoScript is a bit more verbose. It requires specifically describing a values as either TEXT or HTML in order for TYPO3 to handle the values correctly. Values not declared as any type will default to being treated as a number.With JavaScript, simply enclosing a value in single or double quotes is enough. Numbers which are not contained in quotes are considered numeric values in JavaScript. Additionally, performing math on a number stored as a text will convert it to a number, such as multiplying it by 1.Rich Text EditorTYPO3 allows you to control a number of HTML related properties, which arguably should never be handled in markup anyways. These include: * bgcolor * bold * italics * center * font size * font style * font family * indentation * strikethrough * text color * underlineThis list of discrepancies simply points to aspects of TYPO3 which arose in its formative stages, and remain for legacy support. Any self-respecting web developer knows that purely presentation aspects like those should be left to CSS alone, and should never be embedded in HTML.Luckily, you can also restrict tools which can be used by content writers. Doing so simply requires specifying an allowTags array. You can conveniently omit deprecated presentational tags, to keep them from being used at all. This way, you pare down some of TYPO3's power, lest it be wielded haphazardly.TemplatingAnother interesting thing about TYPO3 is the concept of markers. These are a bit like variables which allow you to plant dynamic content within the skeleton of an HTML document. For instance, if I wanted to have the top-level heading on a page change, I would denote it in the design template like so...<h1>###TITLE_OF_NEWS_STORY###</h1>There is also another method of templating on the horizon, called TemplaVoilà. It makes it possible for TypoScript developers to integrate templates using a visual interface, never having to touch any PHP. I am usually leery of GUI tools because the code the create typically isn't what I'm trying to accomplish on a granular level. However, from what I've heard from TYPO3 gurus, this is not actually creating HTML for you, simply allowing you to map dynamic content to areas of your static page skeleton. See the TYPO3 wiki for more on that.GraphicsTYPO3 can also handle graphics processing on the server. This requires two PHP libraries to be installed. The first is GDLib, typically enabled in most PHP configurations. The second is ImageMagick, which is great for scaling images to create photo thumbnails. These yield a dizzing array of possible visual effects: adjusting image tone, crop, rotate, invert colors, emboss, scale, shadow, outline - to name a few. These should of course be used sparingly.FormsTYPO3 also has a form builder, allowing the admin to create complete forms without necessarily having to know HTML. Mandatory fields can be set for things like sign-up forms, where the user must enter a minimum amount of personal information in order to register for an event. You can also create login forms for certain sections of a site. This would be good for a personnel directory, which you'd not want publicly viewable due to email spam and telemarketers.ExtensionsChapter 11 covers extensions. There are a few examples given, such as a chat room extension and newsletter extension. It then goes on to explain how you would go about writing your own extension, if you needed additional functionality not covered by existing options.i18nChapter 13 is all about how to use TYPO3 in a multilingual environment. Entire sites can be configured to be auto-translated into different languages. While I'm sure these site versions aren't 100% accurate (nothing automated is), it would certainly go a long way to appealing to a broader audience. It supports an impressive number of languages, with the current count at over 30.SummaryTYPO3 has tremendous breadth and depth, but is not exactly the most user friendly CMS. The fact that there is an entire configuration language dedicated to it makes the learning curve a bit intimidating for newcomers. Additionally, the drabness of the administrative interface is a bit of a turn-off.However, for the amount of power in customization that it offers, you'd be hard pressed to find another option that runs on PHP. Django is similar in complexity and flexibility, but it's written in Python. Bottom line, if you find yourself working with TYPO3, I'd highly recommend Mastering TypoScript.
Amazon Verified review Amazon
Diane Cipollo Mar 27, 2007
Full star icon Full star icon Full star icon Full star icon Full star icon 5
TYPO3 is a free, open-source template-based content management system which has a user-friendly workspace for editing and authoring content. The TYPO3 template engine can be used as is or you can add more functionality and customization to the system with the TypoScript language. This book by Daniel Koch will help you understand TYPO3 and TypoScript and how to customize your TYPO3 site layout in several ways including generating dynamic menus and graphics.Koch begins with an introduction to both TYPO3 and TypoScript. He discusses the building blocks of TypoScript such as objects, properties, operators and data types. Next he introduces a few helpful tools including the Ultra Edit text editor as well as the Constant Editor which is used for editing the standard TYPO3 templates. These design templates are what control the layout of the TYPO3 site. However, these templates are different from the HTML templates you may have encountered. Koch explains these differences and how to use markers, subparts and placeholders to control dynamic content.Koch then moves on to dynamic menu and image generation. He discusses how you can do a lot of graphic processing with TypoScript from embedding and modifying the size of your images to using GIFBUILDER to generate dynamic images. He also covers how TYPO3 can add shadows and embossing effects. Finally, he covers how to use TypoScript for image caching.Without a navigation menu, your site visitors will not be able to go beyond the homepage. Koch discusses the creation and customization of dynamic text, graphical and JavaScript based menus with TypoScript. Then he covers using the HMENU object for hierarchical menus. Frames are also used to control the layout of a website and Koch covers TYPO3's IFRAME and IFRAME2 extensions.Part of your site will require a membership area and login authentication. TYPO3 supports forms, such as a login form, and Koch shows you how to create forms for your site with the Forms Wizard. He discusses how to set up forms with required fields and how to add CSS style. Next, he shows how to use TypoScript and the Front End User Admin and MailformPlus extensions. If you have a large, dynamic driven website you will need database functionality. Koch covers how to program SQL queries within TYPO3.You may want to add other extensions or create your own extensions. Koch covers both of these topics. He shows how to use the Extension Manager to install and manage several TYPO3 extensions which include a news, chat, newsletter and calendar extensions. Next, he covers how to make your own extensions with Kickstarter.Once you have your site layout and extensions in place, Koch covers how to use TypoScript to optimize your site, add a multiple language option, and generate PDF pages of your site. Finally, Koch covers the steps needed to make a TYPO3 site search engine friendly.Daniel Koch is an author and developer specializing in open source applications and content management systems.
Amazon Verified review Amazon
T3J_kazu May 23, 2007
Full star icon Full star icon Full star icon Full star icon Full star icon 5
TYPO3のスクリプト言語 TypoScript は非常にパワフルで使いやすい言語です。TYPO3のほとんどの動作をコントロールでき、PHP言語などとの連携も可能です。TypoScriptのデベロッパーマニュアルは、豊富にありますが、ドイツ語が多く、英語はその次ですが、全体を学ぶマニュアルとして、この本は最適です。本の中に説明されているサンプルコードも出版社のWebサイトからダウンロードでき、読みながら動作確認する際に便利でした。出来れば、もう少し、実際のScriptを実行した際に動作する画面などのハードコピーが多いと、読みながら確認できます。また、実際にチュートリアル的に、コードを作りこみながら動作を学べるように、サンプルコーディングのフローに一貫性があると、覚えるのに早いように感じました。
Amazon Verified review Amazon
P Mar 10, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Material was as in the description. And delivery was very fast: it fit what was stated in the advertisement. Great seller
Amazon Verified review Amazon
N. Krumpe Nov 19, 2007
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
I purchased this book knowing that there is a steep learning curve for Typo3. I was hoping to develop a church web site, and I truly believe that Typo3 is the way to go.However, even after spending time with this book, I'm still quite overwhelmed by all that Typo3 involves. The book, in my opinion, is not well edited. Often, it tries to walk you through some kind of step-by-step tutorial, but there are so many inconsistencies between what's in the book and what's on my screen that I get really frustrated.I'll keep trudging through it, but I really wish I could find a well written Typo3 tutorial or book.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela