Extend Autonav controller
Permalink
Hi
I am trying to change some functionality of the Autonav block. Given the controller looks like this
And I want to override the getUrl() method in AutonavBlockItem, what do I need to place in my blocks/autonav/controller.php file?
I have tried this, but it does not execute/die, but still loads.
Thanks
I am trying to change some functionality of the Autonav block. Given the controller looks like this
And I want to override the getUrl() method in AutonavBlockItem, what do I need to place in my blocks/autonav/controller.php file?
I have tried this, but it does not execute/die, but still loads.
<?php defined('C5_EXECUTE') or die("Access Denied."); class AutonavBlockController extends Concrete5_Controller_Block_Autonav { } class AutonavBlockItem extends Concrete5_Controller_Block_AutonavItem { /** * Gets a URL that will take the user to this particular page. Checks against URL_REWRITING, the page's path, etc.. * @return string $url */ function getURL() { die(); $dispatcher = ''; if (!URL_REWRITING) { $dispatcher = '/' . DISPATCHER_FILENAME; }
Viewing 15 lines of 27 lines. View entire code block.
Thanks
http://www.concrete5.org/community/forums/customizing_c5/override-c...