Posts by tonyastley

    Hello,


    I'm trying to use perch_content_custom to select the first two items from a combined set of regions, then sort the items in reverse order:


    Code
    1. 'count'=> 2,
    2. 'sort-order' => 'DESC',
    3. 'sort' => '_id'

    However this is selecting the last two items from the list.


    Is it possible to select the first two items then sort them afterwards?

    This code works for me:


    I think it will only work to the second level but it works OK at the moment.

    I’m looking to set htaccesss so that the following url


    /any-section?page=sub-section


    Looks like the following


    /any-section/sub-section


    Both '/any-section' and '/sub-section' could be anything.


    There is already the standard Perch htaccess (below) removing the .php from the end of the /any-section.php filename.


    Code
    1. # Redirect to PHP if it exists.# e.g. example.com/foo will display the contents of example.com/foo.phpRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME}.php -f
    2. RewriteRule ^(.+)$ $1.php [L,QSA]