Use block controller function out of controller


/ Published in: PHP
Save to your folder(s)

With this snippet, you can use every function from blocks even if they are not added to your page


Copy this code and paste it in your HTML
  1. $bl = BlockType::getByHandle('BLOCKHANDLE');
  2. $con = $bl->getController();
  3. echo $con->FUNCTIONNAME();

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.