O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

concrete5 for Developers

Book Description

Learn to develop themes, blocks, and attributes with concrete5

In Detail

Among the various PHP-based content management systems, concrete5 has been rising in popularity. The CMS in itself is neither very bloated nor very limiting, thereby making concrete5 an ideal pick for building websites and a hit among developers.

concrete5 for Developers discusses concrete5 development and web development with this PHP-based CMS. It starts with theme development for concrete5, and also explains ways to convert your existing HTML designs into templates ready for use with concrete5. Special emphasis is laid on the MVC framework in concrete5.

This book follows an easy-to-grasp model with a step-by-step approach. Each topic is explained at length and is followed and supplemented by examples in code, followed in turn by an explanation of the sample code.

What You Will Learn

  • Offer your concrete5 themes for sale in the official marketplace
  • Develop advanced blocks for complex and feature-rich interactive websites
  • Perform database actions, especially for power users building advanced websites
  • Override the default functionality of concrete5
  • Store data in concrete5 by means of attributes and attribute types
  • Work with the permission system of concrete5
  • Build blocks for concrete5 in order to use them on your websites
  • Create themes and templates ready for concrete5 from HTML templates

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. concrete5 for Developers
    1. Table of Contents
    2. concrete5 for Developers
    3. Credits
    4. About the Author
    5. Acknowledgments
    6. About the Reviewers
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    8. 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. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    9. 1. Building a concrete5 Theme
      1. Themes and page types
      2. Getting started with theme building
        1. The development tools and environment
      3. Designing templates – things you should know
        1. Types of websites
        2. Navigation menus
        3. Images
        4. Other design issues
      4. Creating the theme
        1. Installing the template
        2. The theme's thumbnail
        3. The theme's description
        4. The theme's style sheet
      5. Creating the default page type
        1. The <head> tag
        2. The <body> tag
        3. Content areas
          1. The main or primary content
          2. Sidebar
          3. Navigation
          4. Footer
          5. Miscellaneous
        4. A single page template
      6. Packaging your theme for the marketplace
        1. Submitting your theme to the marketplace
      7. Summary
    10. 2. Introduction to concrete5 Blocks
      1. The directory structure of concrete5 blocks
        1. The database – db.xml
        2. The controller – controller.php
        3. The icon – icon.png
        4. The core templates
        5. Custom view templates
        6. Assets
        7. Additional tools
      2. The MVC framework in concrete5
      3. Creating a new block
      4. Validating user inputs
      5. Summary
    11. 3. Advanced concrete5 Blocks
      1. Using database tables
        1. Database connections
        2. Database queries
      2. Getting data from the database
        1. The GetOne command
        2. The GetRow command
        3. The GetAll command
        4. The database debugging mode
      3. Working with advanced concrete5 blocks
        1. The composer
      4. Working with file management
      5. Overriding the default functionality of concrete5
        1. How to override?
      6. Packaging your code for distribution
        1. Packages in concrete5
        2. The package controller
      7. Summary
    12. 4. Attributes in concrete5
      1. An overview of the concrete5 attributes
      2. Attribute terminology in concrete5
      3. Understanding and working with attribute terminology in concrete5
        1. The attribute category
          1. Creating an attribute category
        2. The attribute key
          1. Creating a database file for the attribute keys
          2. Creating a class file
            1. The ObjctAttributeKey class
            2. The ObjctAttributeValue class
          3. Creating a view page for the attribute category
            1. Adding attribute capabilities to the objects
        3. The attribute type
          1. The database file
          2. The attribute type controller
      4. Creating a custom attribute type in concrete5
        1. The database file
        2. The form.php file
        3. The controller.php file
        4. The PacktAddressAttributeTypeValue class
      5. Installation of the custom attribute type
        1. Using the new custom attribute type
      6. Summary
    13. 5. Permissions and Workflows
      1. Introducing permissions in concrete5
      2. The difference between simple and advanced permissions
        1. Simple permissions
        2. Advanced permissions
      3. A closer look at advanced permissions in concrete5
        1. Enabling advanced permissions
        2. Assigning permissions
        3. Inclusion and exclusion
        4. Timed permissions
        5. Copying permissions
      4. A note on area and block permissions
      5. Managing advanced permissions programmatically in concrete5
      6. Workflows in concrete5
        1. More about the basic workflow
          1. The workflow list
          2. The Waiting for Me section
      7. Setting up the basic workflow
        1. Creating the workflow
        2. Attaching workflow to page permissions
          1. Modus operandi
      8. Summary
    14. Index