Viewing 2 replies - 1 through 2 (of 2 total)
  • This is because since 2.6 the template-pages and stylesheet pages are split.

    I solved this doing :

    1. Insert the following at line 26 ( after $allowed_files = array_merge….. )

    $sorted_stylesheets = $themes[$theme][‘Stylesheet Files’] ;
    natcasesort($sorted_stylesheets) ;
    $sorted_stylesheets = array_values($sorted_stylesheets);

    $sorted_templatefiles = $themes[$theme][‘Template Files’] ;
    natcasesort($sorted_templatefiles) ;
    $sorted_templatefiles = array_values($sorted_templatefiles);

    2. replace the following :

    > line 125:
    <?php foreach($themes[$theme][‘Template Files’] as $template_file) :

    by :
    <?php foreach($sorted_templatefiles as $template_file) :

    > line 136:
    <?php foreach($themes[$theme][‘Stylesheet Files’] as $style_file) :

    by :
    <?php foreach($sorted_stylesheets as $style_file) :

    Thread Starter hungzai

    (@hungzai)

    IT WORKED! THANKS!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sorting template files by alphabetically order’ is closed to new replies.