EXT: TS Tidy

Extension Key: tstidy

Copyright 2000-2002, Mads Brunn, <mads@typoconsult.dk>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: TS Tidy	1

Introduction	1

What does it do?	1

Configuration	2

Reference	2

Known problems	3

To-Do list	3

Changelog	3

Introduction

What does it do?

This extension makes you configure tidy to clean up your html-code before it's sent to the browser. Now your'e propably thinking something like “but isn't TYPO3 already capable of doing that?”. Yes, but so far you have only been able to configure tidy via the Install Tool. With this extension you can do it with TypoScript. This means that you can use tidy on a per template-basis. You can e.g. enable tidy for a special page tree or you can change it's behaviour by changing the tidy – parameters in an extension template (+ext). This is usefull if e.g. you have set up a newsletter template and you don't want tidy to clean up the plaintext version.

Configuration

Install the extension in Extension Manager.

Disable tidy in the Install Tool (if enabled).

Modify your TypoScript Templates.
Insert the following lines in your setup:

#enables tidy
config.tx_tstidy_enable = 1
#tidy option
config.tx_tstidy_option = output
#The path to tidy with options (this must be changed to fit your environment)
config.tx_tstidy_path = tidy -i --quiet true --tidy-mark true -wrap 0 -raw

Reference

Property:	Data type:	Description:	Default:
config.tx_tstidy_enable	boolean	Enables tidy.	
config.tx_tstidy_option	string	Options for tidy. 'all' = the content is always passed through Tidy before it may be stored in cache. 'cache' = only if the page is put into the cache, 'output' = only the output code just before it's echoed out.	
config.tx_tstidy_path	string	The path to tidy with options. For all options, check the reference at http://tidy.sourceforge.net/docs/quickref.html	tidy -i --quiet true --tidy-mark true -wrap 0 -raw

Known problems

- None so far.

To-Do list

- None so far. Suggestions are welcome.

Changelog

1.0	First upload.

EXT: TS Tidy - 3

EXT: TS Tidy

Kasper Skårhøj

2002-11-01T00:32:00

Kasper Skårhøj