Controller of generated single page through package not working

Permalink
Hi,

I generated a single page (/artwork) when installing my package. I have put the controller of this single page in '/packages/artisophy/controllers/single_page/artwork.php', but it doesn't seem to be picked up, yet the single page has been generated.

This is the code of the single page controller:
<?php
namespace Concrete\Package\Artisophy\Controller\SinglePage;
defined('C5_EXECUTE') or die('Access Denied.');
use Concrete\Core\Page\Controller\PageController;
class Artwork extends PageController
{
    /**
     * Show artwork page
     */
    public function view($handle = null)
    {
      die($handle);
    }
}


Is this even possible or am I doing something horribly wrong?

Thanks in advance!

syntac
 
linuxoid replied on at Permalink Reply
linuxoid
Have a look at that thread - pay attention to the file, folder, class and namespace names:

https://www.concrete5.org/community/forums/customizing_c5/help-with-...

And have a look at the skeleton package I've created, see how it's all done there:

https://www.concrete5.org/community/forums/customizing_c5/free-concr...
hutman replied on at Permalink Reply
hutman
If you go to Dashboard -> Pages & Themes -> Single Pages and "Refresh" your single page does the controller work? I have found if you install a single page and then add a controller it's not picked up right away, it's much better to have the controller in place then install the single page.

Also, how did you install the single page? Depending on how you installed it you might need to move the controller.