Using an External Typoscript Editor

October 21, 2006

Until earlier this year I had always written my Typoscript by simply typing it into the setup field in the TYPO3 back end, but I was longing for access to features in my typoscript editing that I was enjoying in the editing of other code (XHTML, CSS, PHP). I wanted to have features like:

  1. Search and Replace
  2. Auto Indenting
  3. Syntax Highlighting
  4. Code folding
  5. Multiple views of the same code (for comparing or cutting/ pasting between different sections of the code)
  6. Auto complete

At first I experimented with external Typoscript files, editing them with my editor of choice and including them using an include instruction like:

<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/html/mainmenu_typoscript.txt">

This was an improvement as I could now work in my editor of choice and had features #1 & 2 on my list. But then I discovered jEdit and the extension that integrates it into TYPO3. Once installed, you can connect through jEdit to your site and open the Typoscript constants and setup fields in your templates. This allows you to edit the code in jEdit, and when you save the code, jEdit also clears the TYPO3 cache. Pretty cool. Using jEdit gives me everything on my list except auto complete. Plus it is open source and free.

Here is a screen shot of jEdit in action (opens in new window).

I now do 90% of my typoscripting editing using jEdit. The only advantage that editing in the TYPO3 backend has over jEdit is being able to revert to previous versions of the  code, but personally, I have never needed that capability.

One item of note: I have found that in my installations I have had to manually add the setup typoscript to my page template. Normally, the extension should include it automatically, but if not, just put the code in your page template. You will find the code in the manual and in the extension file named ext_typoscript_setup.txt.

You can find information about jEdit and the extension that integrates it at this page in the TYPO3 Wiki. Also, I believe the extension is dependent on having installed the "XMLRPC Lib" extension.

 
 

Noggin's Notebook

This is my little corner to chronicle my adventures in all things web including CSS, HTML, TYPO3, PHP and whole host of other acronyms.

RSS Feed for Noggin's NotebookRSS Feed for
Noggin's Notebook