The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Anchor CMS Problem: Conditional Page Function

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #157544
    Taufik Nurrohman

    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.

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.