I'm creating a custom theme package that requires a "theme specific" single_page... referring to the official documentation:
---
"If you need more flexible control over a single page within a particular theme, just include a file with the same name as your single page within the theme itself.
That entirely file will be used as the single pages template, including the header, footer, etc... It can completely override the single page, too.
(So, in our example above, once we have "my_profile" added as a single page, add "my_profile.php" to your active theme. This template will then be used instead of the single page." - c5 docs
---
So how do you do this from within the package's controller file?
Here is the code I'm using to create the single page:
//myPackage/controller.php
Loader::model('single_page');
$sp = SinglePage::add('/style_guide', $pkg);
$sp->update(array('cName'=>t("Style Guide"), 'cDescription'=>t("Site design style guide.")));
This newly created single page will only be picked up when I manually copy the single page file, in this case "style_guide", into the root/single_pages/ directory.
I've found some info here (filed under bugs?):
http://www.concrete5.org/developers/bugs/5-4-1-1/install-single-pag...
, but at this point I'm a little confused as to how to work with single_pages that are "theme specific" since in testing in order for the theme specific single_page to be picked up by c5 I had to always copy the file first to the root/single_pages/ directory... for some reason it won't work without a file in there first... then an over-ride file placed in the theme folder with the same name.
The funny thing is, once c5 makes the link to the over-ride file in the theme folder the root/single_pages/ file is no longer needed and can be deleted. Would be nice to eliminate this step of manually copying the file over just to install the "over-ride" version of it stuffed in my theme folder... but since wishing in one hand pretty much produces ... well, we know what in the other...
...so I guess my question is, can you install a theme specific single page from within the package installer and if so, any suggestions as to how :)
Root Level Single Page (installs correctly)
packages/myPackage/single_pages/custom_page.php
Theme Specific Single Page (no workie)
packages/myPackage/themes/myTheme/custom_page.php
... so this leads me to believe that "theme specific" single pages are not supported in packages?