Posts by tonyastley


    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:

    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


    Looks like the following


    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.

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