You are previewing concrete5 Beginner's Guide.
O'Reilly logo
concrete5 Beginner's Guide

Book Description

concrete5 is a superb content management system and this book will show you how to get going with it. From basic installation through to advanced techniques of customization, it’s the perfect primer for web developers.

  • Create your own theme to customize the look of your site.

  • Create new blocks from scratch to learn how to embed new content elements in your concrete5 site using HTML, CSS, PHP and JavaScript.

  • Wrap everything in a package for easy handling and distribution of your add-ons.

  • Learn how to install and set up a concrete5 website.

  • Build block templates to change the output of blocks to suit your needs.

  • In Detail

    concrete5 is an open source content management system (CMS) for publishing content on the World Wide Web and intranets. concrete5 is designed for ease of use, and for users with limited technical skills. It enables users to edit site content directly from the page. It provides version management for every page and allows users to edit images through an embedded editor on the page.

    concrete5 Beginner’s Guide shows you everything you need to get your own site up and running in no time. You will then learn how to change the look of it before you find out all you need to add custom functionality to concrete5.

    concrete5 Beginner’s Guide starts with installation, then you customize the look and feel and continue to add your own functionality. After you’ve installed and configured your own concrete5 site, we’ll have a closer look at themes and integrate a simple layout into concrete5. Afterwards, we’re going to build a block from scratch which you can use to manage a news section. We’re also going to add a button to our site which can be used to create a PDF document on the fly. This book also covers some examples that show you how to integrate an existing jQuery plugin.

    concrete5 Beginner’s Guide is a book for developers looking to get started with concrete5 in order to create great websites and applications.

    Table of Contents

    1. concrete5 Beginner's Guide - Second Edition
      1. Table of Contents
      2. concrete5 Beginner's Guide - Second Edition
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Time for action – heading
          1. What just happened?
          2. Pop quiz – heading
          3. Have a go hero – heading
        6. Reader feedback
        7. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Installing concrete5
        1. Preparing for installation
          1. Web browser
          2. Text editor
          3. Archive utility
          4. FTP client
        2. Installing Bitnami
        3. Time for action – installing Bitnami WAMP stack
          1. What just happened?
          2. Pop quiz – requirements for concrete5
        4. Downloading concrete5
        5. Time for action – downloading the latest version
          1. What just happened?
        6. Creating an empty MySQL database
        7. Time for action – creating a MySQL database
          1. What just happened?
        8. Installing concrete5
        9. Time for action – installing concrete5
          1. What just happened?
            1. The configuration file
          2. Pop quiz – the configuration file
            1. Disabling caching
        10. Time for action – disabling caching
          1. What just happened?
            1. Enabling pretty URLs
        11. Time for action – enabling pretty URLs
          1. What just happened?
            1. File and directory structure of concrete5
            2. Dispatcher process
        12. Summary
      9. 2. Working with concrete5
        1. Getting familiar with concrete5
        2. Time for action – logging in to concrete5
          1. What just happened?
        3. Adding new blocks
        4. Time for action – adding new blocks
          1. What just happened?
        5. Time for action – editing existing blocks
          1. What just happened?
          2. Have a go hero – adding more blocks
        6. Time for action – exiting edit mode
          1. Pop quiz – concrete5 inside the editing mode
        7. Working with the dashboard
        8. Time for action – changing the site's name
          1. What just happened?
        9. Adding more pages
        10. Time for action – adding pages to create a news section
          1. What just happened?
        11. Time for action – adding blocks to a new page
          1. What just happened?
          2. Have a go hero – adding more pages
        12. Managing page defaults
        13. Time for action – adding default blocks to a page type
          1. What just happened?
          2. Adding blocks to existing pages
        14. Time for action – adding blocks to existing pages
          1. What just happened?
        15. Moving and sorting pages
        16. Time for action – moving and sorting your pages
          1. What just happened?
        17. Splitting content into columns
        18. Time for action – creating a multi-column layout
          1. What just happened?
          2. Have a go hero – adding more columns and blocks
        19. Copying blocks using the clipboard
        20. Time for action – copying the block using the clipboard
          1. What just happened?
        21. Working with stacks
        22. Time for action – working with stacks
          1. What just happened?
        23. Styling with design and CSS
        24. Time for action – styling your blocks
          1. What just happened?
          2. Have a go hero – customizing more styles
          3. Have a go hero – play around
        25. Summary
      10. 3. Managing Permissions
        1. Managing basic permissions
          1. Adding users and groups
        2. Time for action – adding groups
          1. What just happened?
            1. Group expiration options
        3. Time for action – adding users
          1. What just happened?
            1. Working with user attributes
          2. Granting sitemap and file manager permissions
        4. Time for action – assigning sitemap permissions
          1. What just happened?
        5. Time for action – granting file manager permissions
          1. What just happened?
          2. Have a go hero – time restriction for permissions
          3. Granting page editing permissions
        6. Time for action – granting edit access
          1. What just happened?
            1. Managing edit access on a page by page basis
          2. Creating a protected website section
        7. Time for action – creating a protected website
          1. What just happened?
          2. Granting partial dashboard access
        8. Time for action – granting partial dashboard access
          1. What just happened?
          2. Restricting block access
        9. Time for action – restricting access to blocks
          1. What just happened?
        10. Working with the advanced permission mode
        11. Time for action – activating the advanced permission mode
          1. What just happened?
            1. Managing advanced page permissions
        12. Time for action – removing permissions to change permissions
          1. What just happened?
          2. Managing area permissions
          3. Managing block permissions
          4. Managing subpage permissions
        13. Time for action – setting subpage permissions
          1. What just happened?
          2. Pop quiz – permissions in concrete5
        14. Summary
      11. 4. Managing Add-ons
        1. Introduction to add-ons
          1. Installing add-ons from the marketplace
        2. Time for action – installing an add-on
        3. Time for action – uninstalling an add-on
          1. What just happened?
          2. Have a go hero – installing more add-ons
          3. Manually installing an add-on
        4. Time for action – installing an add-on manually
          1. What just happened?
        5. Working with theme add-ons
          1. Parts of a theme
          2. Theme file structure
        6. Working with block add-ons
          1. Block structure
        7. Packages
          1. Pop quiz – what's a package?
        8. Summary
      12. 5. Creating Your Own Theme
        1. Starting with a new layout
          1. The HTML code
          2. CSS rules
        2. Converting HTML and CSS to a concrete5 theme
        3. Time for action – creating the concrete5 theme header
          1. What just happened?
        4. Time for action – creating the concrete5 theme footer
          1. What just happened?
        5. Time for action – creating a page template
          1. What just happened?
        6. Time for action – creating more page templates
          1. What just happened?
          2. Pop quiz – what are page templates and page types?
        7. Installing your theme
        8. Time for action – installing theme
          1. What just happened?
        9. PHP constants and functions
        10. Time for action – getting a list of available constants
          1. What just happened?
        11. Time for action – listing all available functions
          1. What just happened?
        12. Time for action – checking for edit mode
          1. What just happened?
        13. Time for action – hiding content from anonymous visitors
          1. What just happened?
        14. Time for action – restricting numbers of blocks per area
          1. What just happened?
        15. Time for action – inserting a block wrapper in an area
          1. What just happened?
        16. Working with page attributes
        17. Time for action – using attributes to set background picture
          1. What just happened?
        18. Time for action – accessing attribute data from a template
          1. What just happened?
          2. Pop quiz – what are attributes?
        19. Inserting blocks in templates
        20. Time for action – replacing the header area with a template block
          1. What just happened?
        21. Time for action – finding autonav block properties
          1. What just happened?
        22. Time for action – specifying block templates in an area
          1. What just happened?
        23. Applying a theme to a single page
        24. Time for action – creating a single page layout
          1. What just happened?
        25. Time for action – adding variables to handle login errors
          1. What just happened?
          2. Pop quiz – what's a single page?
        26. Creating customizable themes
        27. Time for action – creating a customizable theme
          1. What just happened?
          2. Have a go hero – adding more customizable styles
        28. Summary
      13. 6. Customizing Block Layouts
        1. Custom templates to modify a block layout
        2. Thumbnails in a page list
        3. Time for action – adding thumbnails to a page list
          1. What just happened?
        4. Time for action – restricting thumbnails to a custom dimension
          1. What just happened?
          2. Have a go hero – improving the thumbnail page list
          3. Have a go hero – exploring concrete5 helpers
        5. Block template folder
        6. Time for action – creating a template folder
          1. What just happened?
          2. Pop quiz – how to include CSS and JavaScript files
        7. Picture pop-ups in a content block
        8. Time for action – building a lightbox gallery
          1. What just happened?
          2. Have a go hero – creating another JavaScript gallery
        9. Adding a Gravatar picture in the guestbook
        10. Time for action – adding a Gravatar picture to the guestbook
          1. What just happened?
        11. Avoiding duplicate code in a custom template
        12. Time for action – including an existing template
          1. What just happened?
        13. Transforming a slideshow into a gallery
        14. Time for action – creating a gallery template for a slideshow
          1. What just happened?
        15. Time for action – adding a slideshow gallery
          1. What just happened?
        16. Slideshow using file attributes
        17. Time for action – adding file attributes to our slideshow
          1. What just happened?
        18. Time for action – using file attributes in the gallery
          1. What just happened?
        19. Using advanced tooltips in the content block
        20. Time for action – creating advanced tooltips
          1. What just happened?
        21. Summary
      14. 7. Adding Site Navigation
        1. Introducing the autonav block
          1. Preparation
        2. Time for action – undoing autonav block integration
          1. What just happened?
          2. Autonav options
            1. Autonav page structure
            2. Page order
            3. Example 1 – showing all pages
            4. Example 2 – showing relevant subpages
            5. Example 3 – showing relevant subpages starting from the top
          3. Autonav output
        3. Adding navigation images
        4. Time for action – creating page attributes for navigation pictures
          1. What just happened?
        5. Time for action – creating a block picture navigation template
          1. Pop quiz – parts of image navigation
          2. What just happened?
        6. Adding a CSS3 hover effect
        7. Time for action – creating a CSS3 transition autonav template
          1. What just happened?
          2. Have a go hero – create more transitions
        8. Building a drop-down navigation
        9. Time for action – creating a SooperFish template
          1. What just happened?
          2. Have a go hero – changing the SooperFish parameters
          3. Have a go hero – including SooperFish themes
        10. Sliding mobile navigation
        11. Time for action – building a mobile navigation
          1. What just happened?
        12. Summary
      15. 8. Creating your Own Add-on Block
        1. Building a product information block
          1. Steps for creating a block
            1. Adding the database schema
        2. Time for action – creating the database structure
          1. What just happened?
        3. Time for action – creating the block controller
          1. What just happened?
        4. Time for action – creating the editing interface
          1. What just happened?
        5. Time for action – printing block output
          1. What just happened?
        6. Time for action – installing a block
          1. What just happened?
          2. Checking for mandatory fields
        7. Time for action – adding a check for mandatory fields
          1. What just happened?
          2. Adding product categories
        8. Time for action – adding product categories
          1. What just happened?
          2. Have a go hero – getting more information about blocks
          3. Pop quiz – parts of a block
        9. Building a product list
          1. Handling multiple block versions
        10. Time for action – handling multiple block versions
          1. What just happened?
          2. Creating a product list block
        11. Time for action – creating the product list block
          1. What just happened?
          2. Have a go hero – extending the product list
        12. Creating a picture magnifier
        13. Time for action – creating the picture magnifier block
          1. What just happened?
        14. Creating a PDF-generating block
        15. Time for action – creating the PDF generation block
          1. What just happened?
          2. Using generate_pdf.php
            1. Using view.php
        16. Creating a simple gallery
        17. Time for action – creating the simple gallery block
          1. What just happened?
          2. Have a go hero – adding more gallery options
        18. Summary
      16. 9. Everything in a Package
        1. What's a package?
          1. Package structure
          2. The package controller
        2. Time for action – creating the package controller
          1. What just happened?
          2. Pop quiz – what does a package do?
        3. Moving templates into a package
        4. Time for action – moving templates into a package
          1. What just happened?
        5. Moving a theme and blocks into a package
        6. Time for action – uninstalling blocks
          1. What just happened?
        7. Time for action – moving the jQZoom block into a package
          1. What just happened?
        8. Time for action – moving the PDF block into a package
          1. What just happened?
          2. Have a go hero – moving more add-ons
        9. Hooking into core events
          1. Event types
          2. Extending an event
        10. Time for action – hooking into an event from a package
          1. What just happened?
          2. Pop quiz – what can you do with events?
        11. Working with maintenance tasks and jobs
        12. Time for action – executing concrete5 jobs periodically
          1. What just happened?
          2. Creating a new job
        13. Time for action – creating a job to check for broken links
          1. What just happened?
        14. Injecting header items
          1. Adding tooltips for every title tag
        15. Time for action – creating global tooltips
          1. What just happened?
          2. JavaScript browser fixes
        16. Time for action – integrating a CSS fix in a package
          1. What just happened?
          2. Pop quiz – benefits of addHeaderItem
          3. Have a go hero – creating a new package
        17. Summary
      17. 10. Dashboard Extensions
        1. Working with the MVC pattern
        2. Adding the broken link interface
        3. Time for action – creating the broken links dashboard extension
          1. What just happened?
          2. Moving database access into a model
        4. Time for action – creating a package model
          1. What just happened?
          2. Working with multiple controller methods
        5. Time for action – adding a second controller method
          1. What just happened?
        6. Embedding a file editor in the dashboard
        7. Time for action – creating the file editor add-on
          1. What just happened?
          2. Controllers without logic
          3. Have a go hero – extending the file editor add-on
          4. Pop quiz – concrete5 single pages
        8. Summary
      18. 11. Deployment and Configuration
        1. Deploying a concrete5 site
          1. Preparations for deployment
        2. Time for action – disabling pretty URLs and the cache
          1. What just happened?
          2. Transferring MySQL databases
        3. Time for action – transferring MySQL databases
          1. What just happened?
          2. Transferring files to the server
        4. Time for action – transferring files to the server
          1. What just happened?
        5. Time for action – updating the configuration file
          1. What just happened?
          2. Setting file permissions
        6. Time for action – setting file permissions
          1. What just happened?
        7. Updating production configuration
          1. Updating the configuration file
          2. Base URL redirection
          3. Changing the concrete5 language
        8. Time for action – installing a translation file
          1. What just happened?
          2. Improving performance with a cache
        9. Time for action – getting PHP information
          1. What just happened?
            1. Caching with APC
            2. Measuring site performance
        10. Time for action – measuring site performance
          1. What just happened?
          2. Pop quiz – concrete5 configuration
        11. Where to go next
        12. Summary
      19. Pop Quiz Answers
        1. Chapter 1, Installing concrete5
          1. Pop quiz – requirements for concrete5
          2. Pop quiz – the configuration file
        2. Chapter 2, Working with concrete5
          1. Pop quiz – concrete5 inside editing mode
        3. Chapter 3, Managing permissions
          1. Pop quiz – permissions in concrete5
        4. Chapter 4, Managing Add-ons
          1. Pop quiz – what's a package?
        5. Chapter 5, Creating your Own Theme
          1. Pop quiz – what are page templates and page types?
          2. Pop quiz – what are attributes?
          3. Pop quiz – what's a single page?
        6. Chapter 6, Customizing Block Layouts
          1. Pop quiz – how to include CSS and JavaScript files
        7. Chapter 7, Adding Site Navigation
          1. Pop quiz – parts of image navigation
        8. Chapter 8, Creating Your Own Add-on Block
          1. Pop quiz – parts of a block
        9. Chapter 9, Everything in a Package
          1. Pop quiz – what does a package do?
          2. Pop quiz – what can you do with events?
          3. Pop quiz – benefits of addHeaderItem
        10. Chapter 10, Dashboard Extensions
          1. Pop quiz – concrete5 single pages
        11. Chapter 11, Deployment and Configuration
          1. Pop quiz – concrete5 configuration
      20. Index