How to add Blocks to Stacks with code
Permalink
My purpose is to add a block - from blocktype survey and add it to a non-global stack.
What I have so far:
Update: If nothing else, I would at least like to add blocks to a single page.
What I have so far:
Loader::model('attribute/categories/collection'); $args['question']='Just a question'; $options=array(0=>'Yes',1=>'No'); $args['pollOption']=$options; $args['requiresRegistration']='1'; $stack = Stack::getByName('Glasovanje'); $cb = BlockType::getByHandle('survey'); $stack->addBlock($cb, "Global", $args); //Don't know what to write instead of global..
Update: If nothing else, I would at least like to add blocks to a single page.