Custome Theme Installation error

Permalink
Please see attached.

I have the following in my packages>theme_ponsonby>controller.php:
[code]
namespace Concrete\Package\ThemePonsonby\Theme\Ponsonby;

use Concrete\Core\Package\Package;
use Concrete\Core\Page\Theme\Theme;

defined('C5_EXECUTE') or die("Access Denied.");

class Controller extends Package
{

}

protected $pkgHandle = 'theme_ponsonby’;
protected $appVersionRequired = '5.7.3.1';
protected $pkgVersion = '1.0';

public function getPackageDescription()
{
return t("Adds Ponsonby Theme.");
}

public function getPackageName()
{
return t(“Ponsonby”);
}

public function install()
{
$pkg = parent::install();
Theme::add(‘ponsonby’, $pkg);
}
[code]

plus all the theme requirements (header/footer/default/fullwidth/view/description/css).

1 Attachment

trixiemay
 
mnakalay replied on at Permalink Reply
mnakalay
You have 2 problems. First, your namespace is wrong. That's the package's controller so the namespace should be
namespace Concrete\Package\ThemePonsonby;

Second, you put all your code outside of your class. You have
class Controller extends Package
{
}

And all your code comes after that.

It should really be between the brackets, not outside of them.