Cannot create custom block in 5.7
PermalinkBut when I go to Admin Dasbboard > Stacks & Blocks > Block Types, my new block is not there. I see the message "No custom block types are awaiting installation." I'm not sure what I missed. I've read a few other posts on this forum but they differ from the directions so I think they are for another version.
I placed my files in the folder application/blocks/alert_banner
controller.php
<?php namespace Application\Block\AlertBanner; use Concrete\Core\Block\BlockController; class Controller extends BlockController { public function getBlockTypeName() { return t('Alert Banner'); } public function getBlockTypeDescription() { return t('A banner to display timed alerts.'); } }
Any ideas?
Is this the path to controller.php?
application\blocks\alert_banner\controller.php
Do you want to zip your alert_banner folder and attach it so others can look at it?
I've attached the zip. Thanks for helping out.
I downloaded the block and it installs as expected.
What is the name of the folder where concrete5 is installed?
Example:
- concrete5 is installed in a folder called concrete5
- this is the path to the block and controller.php file
concrete5\application\blocks\alert_banner\controller.php
So the full path is cms\application\blocks\alert_banner\controller.php
Do you have the possibility to create a completely fresh concrete5 install ?
Maybe create a development server on your local computer ? Like XAMPP or WampServer
Bit safer to play around with :D
You could copy your life site to your development server if you need that for testing...There are a few how-to's around on how that's done.
And when your block is ready, you can just copy your /application/blocks/alert_banner map to your life site.
good luck!
I had a feeling this was a boneheaded user error. Thanks so much to both of you for all your help. Sorry for wasting your time.
use \Concrete\Core\Block\BlockController;