Insert Block with options hardcoded into page


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

The bID will be NULL, since there wont be any Database entry created


Copy this code and paste it in your HTML
  1. $sp = BlockType::getByHandle('BLOCKHANDLE');
  2. $sp->controller->variablename = '15'; //set variables from database, or create own ones that are normally not set, to check that this block was called programmatically
  3. $sp->render('view'); // templates/... (to use templates)

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.