0%

Book Description

Create and modify templates with TypoScript and TemplaVoila

  • Build dynamic and powerful TYPO3 templates using TypoScript, TemplaVoila, and other core technologies.

  • Customize dynamic menus, logos, and headers using tricks you won’t find in the official documentation.

  • Build content elements and template extensions to overhaul and improve TYPO3’s default back-end editing experience.

  • Follow along with the step-by-step instructions to build a site from scratch using all the lessons in the book in a practical example.

  • In Detail

    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.

    This book is a step-by-step guide for building and customizing templates in TYPO3 using the best solutions available. It takes the readers through one complete example to create a fully functional demonstration site using TypoScript, TemplaVoila, and other core TYPO3 technologies.

    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.

    A step-by-step guide to creating and modifying templates with TypoScript and TemplaVoila

    Table of Contents

    1. TYPO3 Templates
      1. TYPO3 Templates
      2. Credits
      3. About the Author
      4. Acknowledgment
      5. About the Reviewers
      6. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      7. 1. Getting Started
        1. Basic requirements
        2. How templates were created
        3. Introducing TemplaVoila!
        4. Installing TemplaVoila
        5. Creating a basic HTML template
          1. The root tag
          2. The menu area
          3. The content section
        6. Creating your first template with the TemplaVoila Wizard
          1. Selecting the HTML template
          2. Configuring the new site
          3. Mapping the template
          4. Data elements
          5. Mapping instructions
          6. HTML-path
          7. Action
          8. Mapping rules
          9. Starting to map
            1. Mapping the rest of our elements
          10. Header parts
          11. Creating the main menu
          12. Creating the submenu
          13. Testing the finished template
        7. The page tree
        8. If something didn't work right
        9. Adding content to our front page
        10. Summary
      8. 2. Enhancing your Template with CSS
        1. Creating a basic stylesheet
        2. Including stylesheets in TYPO3
          1. What you need for your main stylesheet
          2. Adding CSS with the TemplaVoila Wizard
          3. Including CSS with page.stylesheet
          4. Including CSS with page.includeCSS
          5. Including CSS with page.headerData
        3. Using default markup in TYPO3
          1. Headers
          2. Image with text areas
          3. Bullet lists
          4. Tables
          5. Removing default markup in TYPO3
        4. Summary
      9. 3. Adding Custom Template Fields
        1. Modifying the page metadata
        2. Adding a banner
          1. Adding space for the banner to our HTML file
          2. Adding the banner element to TemplaVoila
            1. Configuring a data element
            2. Viewing the data structure XML
          3. Using our new data element
        3. Adding the date to our template
          1. Adding space for the date to our HTML file
          2. Creating a data element
          3. Viewing the updated XML
          4. Showing our new banner
        4. Loading the date and time from the TypoScript template
          1. Changing our timestamp element in the data structure
          2. Adding the timestamp object to the TypoScript template
        5. Adding a dynamic logo
        6. Summary
      10. 4. Creating Flexible Menus
        1. Page tree concepts
        2. Introducing HMENU
        3. Types of menu objects
        4. Menu item states
        5. HMENU properties
        6. Common menu item properties
        7. Introducing text-based menus
          1. TMENU Properties
        8. Adding separators to menu items
        9. Redesigning the text-based menus
          1. Final code
        10. Introducing graphic menus
        11. Introducing GIFBUILDER
          1. The BOX object
          2. The IMAGE object
          3. The TEXT object
          4. GIFBUILDER layers
          5. GIFBUILDER properties
        12. GMENU properties
        13. Creating our first graphic menu
          1. Modifying based on menu states
          2. Main menu code
        14. Creating a graphic menu with boxes
          1. Submenu code
        15. Using external images for menus
        16. Other types of menus
        17. Breadcrumb navigation
        18. Pulling it all together
        19. Summary
      11. 5. Creating Multiple Templates
        1. Creating new templates with sidebars
          1. Creating the HTML and CSS
          2. Adding columns to the data structure
          3. Creating new TemplaVoila template objects
          4. Mapping new template objects
        2. Assigning a new template to our pages
        3. Creating icons for templates
        4. Assigning templates to subpages
        5. Creating an extension template
        6. Creating a printable template
          1. Creating a print-only stylesheet
          2. Creating a subtemplate
        7. Creating a printable link
          1. Adding a printable link section to the templates
          2. Adding the printable link field to the data structure
          3. Generating a printable link with TypoScript
        8. Summary
      12. 6. Creating a Template from Scratch
        1. Designing the template
          1. Creating a wireframe
        2. Creating the HTML template
        3. Creating the data structure
        4. Creating data structure elements
          1. The banner field
          2. The date field
          3. The main article field
          4. The news fields
          5. The upcoming events title field
          6. The upcoming events list
          7. The event container field
          8. The event date and city fields
          9. The product fields
          10. The contact information fields
          11. The footer field
        5. Mapping the template object
        6. Creating a folder in the page tree
        7. Setting the TypoScript values
        8. Creating an example page
          1. Adding test content
        9. Summary
      13. 7. Customizing the Backend Editing
        1. Updating the rich text editor
          1. Editing the TSconfig
          2. CSS properties
          3. Classes properties
          4. RTE class properties
          5. Toolbar properties
          6. HTML editor properties
        2. Customizing the Page module
          1. Creating the HTML layout
          2. Assigning the backend layout
          3. Adding some CSS styling
        3. Setting a backend layout for a data structure with multiple template objects
        4. Using backend layout files for template objects
        5. Using static data structures in TemplaVoila 1.4.2
          1. What are static data structures
          2. Setting up static data structures
          3. Modifying static data structures
        6. Summary
      14. 8. Working with Flexible Content Elements
        1. Introducing flexible content elements
        2. Creating our first flexible content element
          1. Building the content element
          2. Testing our new content element
        3. Creating a flexible HTML wrapper
          1. Building the content element
          2. Testing our new content element
        4. Creating a multi-column layout element
        5. Extending the multi-column layout element
        6. Creating a product display element
          1. Creating the HTML and CSS
          2. Creating a customized data structure
            1. Product name
            2. Product class
            3. Product image
            4. Product price
            5. Product description
            6. Text for product link
            7. Product link
          3. Viewing our results
        7. Summary
      15. 9. Creating a Mobile Website
        1. Introducing conditions
          1. Browsers
          2. Versions
          3. Operating systems
          4. User agents
          5. Language
          6. Logged in users
          7. Global variables and strings
          8. User function
        2. Testing browser compatibility
        3. Creating a mobile version of your website
          1. Detecting a mobile device
          2. Creating a mobile stylesheet
          3. Customizing our TypoScript objects
          4. Bringing it all together
        4. Adding a non-mobile link
        5. Creating a mobile subtemplate
          1. Adding a new option to our subtemplate pages
          2. Creating a new TemplaVoila template for mobile devices
          3. Adding our subtemplate to the TypoScript template setup
        6. Redirecting to an external mobile site
        7. Summary
      16. 10. Going International
        1. Introduction to internationalization and localization
        2. Adding localization to a website
          1. Adding a website language
          2. Adding your languages to TypoScript
        3. Adding localization to pages
          1. Using the localization tab in the Page view
          2. Hiding non-translated pages
        4. Translating content
          1. Creating universal elements
          2. Adding content without a default language
          3. TemplaVoila translator workflow
        5. Adding a basic language menu
          1. Adding the language menu to our TypoScript template
            1. Viewing our changes on the frontend
          2. Adding flags for language selection
          3. Adding a localized logo
          4. Creating localized TemplaVoila templates
          5. Summary
      17. 11. Building Websites with the TemplaVoila Framework
        1. What is the TemplaVoila Framework?
        2. Benefits of the TemplaVoila Framework
        3. The TemplaVoila Framework workflow
        4. Installing the TemplaVoila Framework
        5. Setting up QuickSite for the first time
          1. Assigning a site URL
          2. Selecting a skin
          3. Viewing our QuickSite frontend
        6. Planning with the wireframe skin
        7. Designing the page layouts
          1. Page Templates
        8. Utility FCEs
          1. Column groups
          2. Module groups
            1. Module options
          3. HTML wrapper
          4. Plain image
          5. Module Feature Image
        9. Creating a custom skin
        10. Editing a skin
          1. Editing TypoScript for the HTML structure
          2. Editing CSS
          3. Editing TypoScript constants
          4. Adding JavaScript
          5. Additional resources
        11. Adding special functionality
        12. Adding content
          1. Feature content
          2. Generated content
        13. Summary
        14. TYPO3 Templates summary
    18.216.27.91