I found that CGContentUtils can do some of these features, although I can't seem to read it's attributes with CGSimpleSmarty.
I've created a true/false drop-down content block called "vertically-align" and it works if I have it directly in a template:
Code: Select all
{content_module module='CGContentUtils' tab="Style" block='center-vertically'}
But using CGSimpleSmarty to get the property in the template doesn't work, and causes the error below:
Code: Select all
{$valign="{cgsimple::get_page_content($node->alias,'center-vertically')}"}
Code: Select all
PHP Catchable fatal error: Argument 4 passed to CGContentUtils::GetContentBlockFieldValue() must be an instance of ContentBase, boolean given, called in ./lib/classes/contenttypes/Content.inc.php on line 158 and defined in ./modules/CGContentUtils/CGContentUtils.module.php on line 657, referer: ./admin/moduleinterface.php?mact=CMSContentManager,m1_,admin_editcontent,0&_sk_=9955b28a0bde1f28&m1_content_id=36
Is there a way to get the CGContentUtils property? I'm using
a similar set-up to this in order to show sub-pages as panels.
Edit: Issue seems to be a known bug, reported here:
http://dev.cmsmadesimple.org/bug/view/10633
Edit2: Found a fix after tinkering with it. One too many parameters were in the function call. Edit line 158 of ./lib/classes/contenttypes/Content.inc.php:
Code: Select all
$tmp =
$module->GetContentBlockFieldValue($blockName,$blockInfo['params'],$params,!$editing,$this);
To this:
Code: Select all
$tmp =
$module->GetContentBlockFieldValue($blockName,$blockInfo['params'],!$editing,$this);