Problem installing test block
Permalink
I want to build some custom blocks, and trying to play with the test block from the docs section. I'm doing this with 5.5; I was able to do this with earlier versions, but the instructions for installing it don't seem to work any more. I tried clearing the cache - no change. Any other suggestions?
Thanks!
Thanks!
You're not installing a new block, you're overriding the existing one.
If you changed the view.php or controller.php you would see that reflected when you use that block.
You could copy the block to a new directory (copy concrete/block/someblock/ to block/somenewblock/), rename the block controller properly and then you would be able to install your *new* block.
If you changed the view.php or controller.php you would see that reflected when you use that block.
You could copy the block to a new directory (copy concrete/block/someblock/ to block/somenewblock/), rename the block controller properly and then you would be able to install your *new* block.
Has anyone successfully installed this test block to 5.5 according to this procedure?
http://www.concrete5.org/documentation/developers/blocks/understand...
http://www.concrete5.org/documentation/developers/blocks/understand...
Since that is from 2008, I'd shy away from it. You are much better off using a current 5.5 block.
You might also want to look into jordanlev's Designer Content in the marketplace - it's a great way to see how all the "widgets" work.
You do need to make your blocks/ directory writeable by the webserver to save your new blocks (not that way by default).
You might also want to look into jordanlev's Designer Content in the marketplace - it's a great way to see how all the "widgets" work.
You do need to make your blocks/ directory writeable by the webserver to save your new blocks (not that way by default).
Are you trying to do this from "Add Functionality" ? That method no longer works. You have to go directly to "Stacks & Blocks > Block Types." It should be listed at the top of that page.
Hi Andrew,
I just copied concrete/blocks/html to blocks/html, modified the view.php and there is no html block listed to install under Block Types.
The modified view is being used of course.
I believe my answer above is still the correct one :)
John
I just copied concrete/blocks/html to blocks/html, modified the view.php and there is no html block listed to install under Block Types.
The modified view is being used of course.
I believe my answer above is still the correct one :)
John
Found it - that works - thank you!
That may be because you also need to rename the directory, and the ...BlockController class name in controller.php.
Hehe, I covered that above, my question is to Andrew, as I believe both my replies above are correct :)
Ah - so you did. I had forgotten that you could override a core block that way, but that wasn't the reason my test block couldn't install.
My real problem was that I was using the wrong Dashboard function to install standalone blocks. Once I went there, there was my test block ready to install, and it installed just fine.
Also note: it was not necessary to change the permissions on the blocks folder for this to work.
My real problem was that I was using the wrong Dashboard function to install standalone blocks. Once I went there, there was my test block ready to install, and it installed just fine.
Also note: it was not necessary to change the permissions on the blocks folder for this to work.
Actually my first reply was to your "Just for giggles" where you stated you didn't see the install after copying a block from concrete/blocks to blocks.
Changing the block folder to writeable was only if you want to save blocks created with the Designer Content addon.
Glad you got it working :)
Changing the block folder to writeable was only if you want to save blocks created with the Designer Content addon.
Glad you got it working :)
Thanks for the clarification. I like the Designer Content add-on, and will be using it for some things, so that will be handy to know.
Either the system checks to see if it's already installed first, or they have to go someplace else to be installed now?
Still searching docs, and so far ruled out all the usual suspects - incorrect class name, directory name, etc.