public function set_pagelayout($pagelayout) {
        global $SESSION;

        if (!empty($SESSION->forcepagelayout)) {
            $this->_pagelayout = $SESSION->forcepagelayout;
        } else {
            // Uncomment this to debug theme pagelayout issues like missing blocks.
            // if (!empty($this->_wherethemewasinitialised) && $pagelayout != $this->_pagelayout)
            //     debugging('Page layout has already been set and cannot be changed.', DEBUG_DEVELOPER);
            $this->_pagelayout = $pagelayout;
        }
    }