Posts by Simon Cox

    Apologies in advance but I have to nerd out now. Many years ago I built a model railway for a competition. In the centre was a water powered mill. It was just going to be a plain water mill but I did some research on mills and just had to make it a fulling mill. Fulling mills hammered felt to make cloth which was then soaked in urine to give it strength (later they used fullercite because - well it's wee.) and to dry the cloth they had a rack outside called a tenter rack. The rack had hooks on it to stretch the cloth and when the cloth dried it shrank and went taught. And this is where the expression on tenter hooks actually comes from.

    So.. I'm excited to find out whats next with Perch! (...I'm not sat here soaked in widdle getting stressed.)

    Yes - if the client has multiple versions of an image (perhaps different sizes and crops) in assets they can quickly see what is used and where - would aid them when they want to add an existing images to a new entry.

    More of an enhancement than a must have though!

    lachie_h I get what you are saying, regarding securing of data and that has been a main push for SSL. But if you have small business website with no form or log in do you really believe your site should be required to have an SSL? All of my clients are smaller and aren't Coca Cola so the privacy concerns seem overblown to me. I don't see how many hackers are going to be hanging out on looking to steal data. Is it good in some circumstances, yes it definitely is. However, making the SSL so important that Google has made it a ranking signal for your site doesn't seem right to me. Just my 2 cents.

    I can't think of a situation why would you not use https. The cost barrier to this has now gone - the hosting I use provide good certs free of charge and the advantages of using https/2 to speed up your site are only available to secure sites. I set up local certs in MAMP Pro - couple of button pushes - when developing Perch sites, so I don't have to firefight my http link mistakes after launch. I believe the Google argument is long over - everything should be on https now as there is no advantage not to be.

    This is aimed mainly drewm but all criticisms or expansions on this welcome.

    I have just seen a neat little feature on a clients hosting (on - yuk but that was their choice - trying to get them to move to Perch) where when one of the assets is in use on a page they let you know.

    I know Perch keeps track of in-use assets and it would be great if we could leverage that a bit more visually. The interface includes a small eye icon over the image showing it is in use - see my attached screen grab. When you hover or click on that icon you get small modal telling you it is in use and on what page/s. To take this further, what they don't do, is to be able to sort the assets by:

    • what is in use,
    • what is not in use,
    • what is a library asset,
    • and what is not a Library asset

    would also be useful to people managing the site.

    Just an idea and may be too many pain points to add this but I thought I'd throw it in.


    The perch_pages_navigation was the perfect way to do this - not sure why I had not thought of it myself.

    Here is what i did (this is mainly for myself when i search for this again in the future...)

    1. perch_pages_navigation(array( 'from-path' => '*', 'levels' => 1, 'hide-extensions' => true, 'hide-default-doc' => true, 'template' => 'articles.list.html', 'use-attributes' => true, ));

    and the articles.list.html template that goes in /templates/navigation

    1. <perch:before><div class="container"> <h2>The articles</h2></perch:before> <h3><a href="<perch:pages id="pagePath">"><perch:pages id="pageNavText"></a></h3> <perch:pages id="description" /><perch:after></div></perch:after>

    Thanks for pointing me in the right direction Drew.

    I am creating a list of sub pages, on a category page, with title link (using _page) and description (don’t want to use the Blog addon) and have run up against two issues I cannot solve.

    1. I wish to add some page text under the h2 heading and would like to use the SEO description to do this - rather than content from the page - but cannot work out how to get the description data into the right place in the output.

    2. The pages list also includes the index.php page which is the category page I am showing this list on - I'd rather not have it on the page but cannot work out a way to not add it.

    Code I have so far:

    1. perch_content_custom(‘Page Heading’, [
    2. ‘page’ => ‘/articles/*’,
    3. ‘template’=>‘gs.list.articles.html’,
    4. ‘sort’=>‘_id’,
    5. ‘sort-order’=>‘ASC’
    6. ]);

    I can't get me head around how to add the description data from perch_page_attribute('description); and pointers please?

    Here is the gs.list.articles.html template:

    1. <h2><a href="<perch:content id="_page" replace=".php|">"><perch:content id="PageHeading" /></a></h2> <perch:content id="description" /> <p><a href="<perch:content id="_page" replace=".php|">">Read more about <perch:content id="PageHeading" /></a>.</p>

    As you can see I am picking up the Page heading from all pages under /articles/ but this also picks up index.php - anyway to not pick this up?

    Thank you.

    https also gives you the ability to utilise http/2 which will give your site some serious speed advantages - people used to steer clear of https because of the cost and the fact that it was slower - not any more. Handily Cloudflare also enables this!