Using Package Config in C5.7
Permalink
Getting the following error:
Call to undefined method Concrete\Package\DarkLeft\Controller::config()
controller file looks like this
what am I missing?
Call to undefined method Concrete\Package\DarkLeft\Controller::config()
controller file looks like this
<?php namespace Concrete\Package\DarkLeft\Controller\SinglePage\Dashboard; use \Concrete\Core\Page\Controller\DashboardPageController; use Loader; use Package; class DarkLeft extends DashboardPageController { public function view() { $pkg = Package::getByHandle('dark_left'); if($pkg->config('fID')){ $this->set('fID',$pkg->config('fID')); } } public function success(){ $this->set("success","Background Saved");
Viewing 15 lines of 24 lines. View entire code block.
what am I missing?
I changed it to this
It saves, and stores it into the DB, but I can't Get it.
I get the following error: Invalid argument supplied for foreach()
Aaaannny thoughts?