Posts by brackl

    I’ve set up a Perch Shop and from my experience it was a bit of a slog to get it working. To echo what has already been mentioned - there seemed to be a real lack of documentation and far too many gotchas.


    What I will say is that Perch allows for a really awesome level of customisation. And this is really the only reason I would consider using Perch at all these days in light of the neglect and lack of development.


    Thanks to this extensibility - I was able to use Perch to build a custom Etsy importer app that synced up my clients Etsy shop to Perch shop. I don’t know any other CMS that allows this kind of extensibility. For this reason I feel perch and indeed perch shop still has great potential!

    Unfortunately the lack of Stripe updates in perch shop means more fiddling required with perch shop just to keep it working! (More effort than it’s worth?). At this point i’ve basically forked the perch shop repo and am developing on it myself.

    Is there anyway to dynamically set a css class within a Perch template? I am displaying categories on my shop page and would like the category that is currently active to have a different style than non-active categories.


    My category template is:


    Code
    1. <perch:before>
    2. <ul class="nav nav-tabs" role="tablist">
    3. <li role="presentation"><a href="/shop" aria-controls="all" role="tab">All</a></li>
    4. </perch:before>
    5. <li role="presentation">
    6. <a href="/shop?cat=<perch:category id="catSlug"/>" aria-controls="<perch:category id="catSlug"/>" role="tab"><perch:category id="catTitle" /></a>
    7. </li>
    8. <perch:after>
    9. </ul>
    10. </perch:after>


    And in my shop page I am using perch_get to grab the category from the URL and filter products:



    What I would like to do is to pass the value of perch get to the category template too. Then, if this value is equal to catSlug give this category the "active" class.


    Is this possible within perch? Or has anyone come up with a clever solution to do achieve the same thing?


    Thanks