Book Image

TYPO3 Templates

By : Jeremy Greenawalt
Book Image

TYPO3 Templates

By: Jeremy Greenawalt

Overview of this book

<p>The template systems in TYPO3 make it one of the most powerful content management systems available today, but they seem too complex for many users. Site developers who are able to learn how to use them efficiently can build more extensible sites quicker and more customized for their users.</p> <p>This book is a step-by-step guide for building and customizing templates in TYPO3 using the best solutions<br />available. It takes the readers through one complete example to create a fully functional demonstration site using TypoScript, TemplaVoila, and other core TYPO3 technologies.</p> <p>This book starts with the basics of creating an example TYPO3 site before showing you how to add your own stylesheets and enhanced JavaScript to the template. You learn about the different types of menus and navigation, and you can try out each one with practical examples in the book. The book shows how to create multiple templates for sections or individual pages in TYPO3 and how you can make a new template completely from scratch for a newsletter. Just as importantly, you learn how to update the editing experience and impress your clients with a custom back-end. Finally, you will learn how to specialize for browsers and internationalize your TYPO3 site with simple template updates.</p>
Table of Contents (18 chapters)
TYPO3 Templates
Credits
About the Author
Acknowledgment
About the Reviewers
Preface
Index

Creating our first graphic menu


The first change we can accomplish is updating our main menu with a custom font and some rollover functionality. We can do that with minimum fuss, and it'll update our whole look nicely. I chose a freeware font from Larabie Fonts (http://www.larabiefonts.com) called Deftone because it'll show off GIFBUILDER, and my boss loves it. You can use any TrueType font file you would like, though. Some fonts seem to work better with ImageMagick then others, so you may need to experiment. In any case, let's start updating our menu:

  1. We need to change lib.mainMenu.1 = TMENU to lib.mainMenu.1 = GMENU to use the GMENU objects.

  2. We want a consistent height for our entire menu, so we'll enable useLargestItemY in our template:

    lib.mainMenu.1.useLargestItemY = 1
    
  3. Let's update the normal menu state first. We won't be using the div tags around our menu items, so want to add a class to our images:

    lib.mainMenu.1.NO.ATagParams = class="menu-link"
    
  4. We can set the background color and...