Search

When there are pages with parent pages in the select box, the parent pages are in the incorrect order.

I'm thinking it arises from the getToggleStates function:

    function getToggleStates($include_parent_titles=true){

        $pages = $this->_engine->Database->fetch("SELECT * FROM `sym_pages` ORDER BY `sortorder` ASC");

        $result = array();
        foreach($pages as $p){

            $title = $p['title'];

            if($p['path'] != NULL && $include_parent_titles){
                $bits = preg_split('/\//', $p['path'], -1, PREG_SPLIT_NO_EMPTY);

                foreach($bits as $h){
                    $parent = $this->_engine->Database->fetchVar('title', 0, "SELECT `title` FROM `sym_pages` WHERE `handle` = '$h' LIMIT 1");
                    $title = $parent . ' / ' . $title;
                }
            }

            $result[$p['handle']] = $title;
        }

        return $result;
    }

Changing the order from ASC to DESC seems to fix this.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details