Custom Block Change Name:

Permalink 1 user found helpful
I have created a custom block. Now want to change name of that block. How to do it ?
I tried changing protected $btName = 'Product link Button' , but it is not showing in front end..

 
jakobfuchs replied on at Permalink Reply
jakobfuchs
Do you have a function named getBlockTypeName() in your Block Controller?
catchanil1989 replied on at Permalink Reply
No.. Below im pasting my controller.php code.

<?php defined('C5_EXECUTE') or die("Access Denied.");
class ProductLinksBlockController extends BlockController {
   protected $btName = 'Product Detail Links';
   protected $btDescription = 'Links for the product details page.';
   protected $btTable = 'btDCProductLinks';
   protected $btInterfaceWidth = "700";
   protected $btInterfaceHeight = "450";
   protected $btCacheBlockRecord = true;
   protected $btCacheBlockOutput = true;
   protected $btCacheBlockOutputOnPost = true;
   protected $btCacheBlockOutputForRegisteredUsers = false;
   protected $btCacheBlockOutputLifetime = CACHE_LIFETIME;
   public function getSearchableContent() {
      return $this->field_1_textbox_text;
   }
jakobfuchs replied on at Permalink Reply
jakobfuchs
Do you have Caching enabled in your site settings? If so, you could try to disable it, clear your cache and comment out the cache related Block configuration options while developing.
catchanil1989 replied on at Permalink Reply
After updating the Block controller btName property, or, if the controller explicitly defines the name using the getBlockTypeName function, in Dashboard, go to Block Types list, click on the Block, then click Refresh. Go back to the Block Types list and the Block name will be updated. All Blocks throughout the site will be updated.

This one worked for me... Thanks for your valuable time...