Default Page Blocks
Permalink Browser Info Environment
Is there any way to make Easy News publish a default page block? I want each story to have a comment block and have tried this by inserting it into the page type default, but it does not display when I add an Easy News entry through the Dashboard.
Thanks
Spencer
Thanks
Spencer
Type: | Discussion |
---|---|
Status: | New |
Thanks for your suggestion, however the code is not in that file. Here's the code from Controller.php:
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); class EasyNewsPackage extends Package { protected $pkgHandle = 'easy_news'; protected $appVersionRequired = '5.4.0'; protected $pkgVersion = '1.1'; function __construct(){ Loader::library('controller',$this->pkgHandle); //Used by controllers Loader::library('dashboardcontroller',$this->pkgHandle); //Used by controllers } public function getPackageDescription() { return t('Add multiple news area to your site.'); } public function getPackageName() { return t('Easy News');
Viewing 15 lines of 31 lines. View entire code block.
Argh, sorry. It's in easy_news/controllers/dashboard/easy_news/controller.php.
It worked!
Thanks for your help.
-Spencer
Thanks for your help.
-Spencer
Oops! It almost worked. The content as entered in Easy News in the Dashboard landed in the block below the Comments. So it auto-populated, but in the next available block of the Main Area as opposed to pushing the block set in the default page below the news. Is there a remedy? I've attached a screenshot.
Thanks for your help,
Spencer
Thanks for your help,
Spencer
Try changing (in same file)
from
to
Hope this fix
from
$p->addBlock($bt, 'Main', $data);
to
$b=$p->addBlock($bt, 'Main', $data); $b->setBlockDisplayOrder(1);
Hope this fix
Worked. Cool!
Thanks,
Spencer
Thanks,
Spencer
in easy_news/controller.php
replace
with
Hope this helps.