Hi! Anyone ever use Anchor CMS? I get a problem on the page conditional function that does not work. I’ve written quite detailed question on their forum but currently no reply, probably because the owner was busy (they have very little CMS contributor).
// page type helpers
function is_homepage() {
return Registry::prop('page', 'id') == Config::meta('home_page');
}
function is_postspage() {
return Registry::prop('page', 'id') == Config::meta('posts_page');
}
function is_article() {
return Registry::get('article') !== null;
}
function is_page() {
return Registry::get('page') !== null;
}
So, I tried to echoing Registry::get('article')
in my html template, and the result is empty if it is not in the article pages, and will result as an array if it is in the article page. But why a comparison like Registry::get('article') !== null
and Registry::get('article') !== ""
or !empty(Registry::get('article'))
does not work?
Thanks for the help.