site_post.php seems permanently cached ?? Deleted it, cleared cache, etc.
Permalink
Okay, tried to add a block programmatically as decribed in this thread:
http://www.concrete5.org/community/forums/customizing_c5/programmat...
I added the above code to config/site_post.php and what happened was every time I visited the page a new instance of the block was created on that page.
That's not how it should work. Right? What would be the point of that?
http://www.concrete5.org/community/forums/customizing_c5/programmat...
$page = Page::getByID($pid); $block = BlockType::getByHandle('some_block'); //set block data (differs for each block type... following is an example for the 'content' type) $data = array( 'content' => '<p>test</p>', ); $page->addBlock($block, 'Area Name', $data);
I added the above code to config/site_post.php and what happened was every time I visited the page a new instance of the block was created on that page.
That's not how it should work. Right? What would be the point of that?
this thread can be deleted if someone wants to delete it!