Book Image

concrete5 Beginner's Guide

Book Image

concrete5 Beginner's Guide

Overview of this book

Table of Contents (19 chapters)
concrete5
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – creating the package controller


Carry out the following steps:

  1. First, create a new directory named c5book in packages.

  2. Within that directory, create a file named controller.php and put the following content in it:

    <?php
    defined('C5_EXECUTE') or die(_("Access Denied."));
    
    class c5bookPackage extends Package {
    
         protected $pkgHandle = 'c5book';
         protected $appVersionRequired = '5.4.0';
         protected $pkgVersion = '1.0';
    
         public function getPackageDescription() {
              return t("Theme, Templates and Blocks from concrete5 for Beginner's");
         }
    
         public function getPackageName() {
              return t("c5book");
         }
         
         public function install() {
              $pkg = parent::install();
         }
    }
    ?>
  3. You can create a file named icon.png 97 x 97 pixels with 4px rounded transparent corners. This is the official specification that you have to follow if you want to upload your add-on to the concrete5 marketplace.

  4. Once you've created the directory and...