Using blocks

Permalink
May sound dumb, but i downloaded the fancybox block (zip file), but how do you added to the site? Is there a upload button i dont see, or do i just unzip and drop into a certain folder? Thanks Frank

wizardontherun
 
frz replied on at Permalink Best Answer Reply
frz
Installing a Block

Before creating a block, it helps to use an existing block from scratch, hopefully the simpler the better. For this, we've provided a very simple sample block for download in our developer downloads section.

To install this block:

* Unzip the block.
* Drag it to your Concrete5 blocks/ folder, which will likely be empty.
* Login to your Concrete5 installation, and go to "Add Functionality" within the dashboard.
* You should see the new block listed as available for installation (after all the currently installed blocks.)
* Click install.

That should be all there is to it. The block will automatically have its database table created and its record added to Concrete, at which point you'll be able to add it throughout your site.

But how does our block know that it should be named "Basic Test"? And how does it create it's database during installation? To get the answer to these questions we head to "controller.php"