News Post Template re-arrange

Permalink Browser Info Environment
Hello guys, ive been trying to play around with EasyNews and pagetypes to try to get default's to work with easynews posts by submitting them into a certain block when creating them through the dashboard.
E.g. click onto link which takes you to new page with the news requested inside a preformated block with a bckground or something.
At the moment, regardless of what page type i choose, easynews removes all formatting and just places the news into the main section, bald.
goto:http://garyclancy.idsi.com.au/postcards/... and check between the different posts. Thanks guys

Type: Discussion
Status: New
mgtdesigns
View Replies:
hanicker replied on at Permalink Reply
hanicker
Sorry for late reply.
Actually Easy News removes all existing Main blocks and add a new content block to main section containing the news.

This behaviour is the one suggested by FAQ package example for developers.

If you want to avoid this behaviour, edit

easy_news/controllers/dashboard/easy_news/controller.php

private function saveData($p) {
               $blocks = $p->getBlocks('Main');
               foreach($blocks as $b) {
                       $b->deleteBlock();
               }
               $bt = BlockType::getByHandle('content');
               $data = array('content' => $this->post('newsBody'));
               $p->addBlock($bt, 'Main', $data);
               Loader::model("attribute/categories/collection");
       }


to change block name, or type.
Hope it helps.
mgtdesigns replied on at Permalink Reply
mgtdesigns
yeh i did some searching in the controller.php and found that and tried to editing. but dont know what coding i should use to make it insert it to a block with a certain class. Would be great if someone could code a lil demo i can edit towards my purpose.
hanicker replied on at Permalink Reply
hanicker
Try putting
$bt->setCustomTemplate('SOMETHING');

under
$p->addBlock($bt, 'Main', $data);

where SOMETHING is the name of a custom template edited by you from view.php.

Can this be a good solution for you?

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.