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 – moving jQZoom block into the package


Carry out the following steps:

  1. As mentioned earlier, remove the jqzoom block from you website by using the Add Functionality section in your dashboard.

  2. Move the directory blocks/jqzoom to packages/c5book/blocks.

  3. Open the package controller we created a few pages earlier; you can find it at packages/c5book/controller.php. The following snippet shows only a part of the controller, the install method. The only thing you have to do is insert the highlighted line:

    public function install() {
       $pkg = parent::install();
    
       // install blocks
          BlockType::installBlockTypeFromPackage('jqzoom', $pkg);
    }
  4. Save the file and go to your dashboard again. Select Add Functionality and locate the c5book package; click on Edit and then Uninstall Package and confirm the process on the next screen. Back on the Add Functionality screen, reinstall the package again, which will automatically install the block.

What just happened?

Besides moving files, we only...