Posts by charlie.elsey

    user wants to be able to add social media embeds to their site - this comes to them in the form of 'get code' html code. I want them to be able to paste that code into a textarea region in Perch editing. Can't seem to get it to output the html and hence the embedded item does not appear on the output page.


    am I missing something? It's Friday...

    thanks pixelnaut, but I've always found the gallery app to be a PITA to be honest, but that's just my point of view, and it's had no real updates since the year dot. I do still use it of course, just looking for other's experiences of anything else that might work 'better' Yeah, define 'better' I know ;)

    I am looking for examples of image galleries that work well within Perch (not runway)


    I don't use the native perch gallery app. I have used woothemes flexslider on a number of projects and it works well for image galleries with a reasonable number of images, though all have to be added one by one... this is seen by users as a bit of a pain ;)


    I have a user who wants something 'better' for large groups of images, masonry grid display or soemthing similar. Not averse to linking to something outside of Perch so long as linkage can be managed within Perch.


    Any ideas much appreciated!


    Many thanks

    Hi Byron, sorry to keep plundering your brain! last question, honest. So I can get to do most what i need but as the event.php is the only page that actually can display an event detail (because all events in a list point to the single "eventURL" as defined in settings for events) I need something in event.php that uses template event-detail.html for future events and template event-result.html for past events


    so in event.php we currently have


    <?php


    perch_events_custom(array(

    'filter'=>'eventSlug',

    'match'=>'eq',

    'value'=>perch_get('s'),

    'template'=>'listing/event-detail.html'

    ));

    ?>


    is there a conditional statement that can go in there to make the selction of templates? thanks for your help as always!

    So the above will show listing of events sorted by future and past


    For an individual event, how to filter to display future or past content?


    current event page


    <?php

    perch_events_custom(array(

    'filter'=>'eventSlug',

    'match'=>'eq',

    'value'=>perch_get('s'),

    'template'=>'listing/event-detail.html'

    ));

    ?>

    Thanks Byron, that looks nice and effective. Where would I use that? In the archive.php page? or somewhere else


    <h2>Past events</h2>


    <?php

    perch_events_custom(array(

    'category' => perch_get('cat'),

    'filter' => 'eventDateTime',

    'match' => 'lt',

    'value' => date('Y-m-d'),

    'sort' => 'eventDateTime',

    'sort-order' => 'desc',

    'template' => 'listing/custom-listing-day.html'

    ));

    ?>

    Hi, using events app archive display - user has list of 'upcoming' and 'past' events. Is it possible that the event detail showing for an event can be different for a 'past' event than that showing when 'upcoming'?


    I ask because we may have an 'upcoming' race event - shows entry details etc. When race is 'past' we would like to show results, not entry details.


    I am guessing this could be done with some clever editing of the event-detail.html template to filter the upcoming and past descriptions


    Any ideas gratefully received, thanks.


    <div class="vevent">

    <h2 class="summary"><perch:events id="eventTitle" /></h2>


    <p class="dtstart"><span class="value-title" title="<perch:events id="eventDateTime" format="l, jS F Y g:i a" />"><perch:events id="eventDateTime" format="%c" /></span></p>


    <div class="description"><perch:events id="eventFutureDescHTML" type="textarea" editor="redactor" encode="false" /></div>


    <div class="description"><perch:events id="eventPastDescHTML" type="textarea" editor="redactor" encode="false" /></div>


    <p class="category"><perch:events id="category_names" encode="false" /></p>


    <perch:if exists="image">

    <img src="<perch:events id="image" type="image" label="Image" width="640" crop="true" />" alt="<perch:events id="eventTitle" />" />

    </perch:if>


    </div>

    A client has e.g. a car site... they need to display a car's current age e.g. car manufactured in 2017 is in 2020 3 years old - yes, that simple output in whole years


    If we have the manufactured_date as a field in database what simple code could be used in template to display/output a list of cars with their current ages


    many thanks

    Hi, wondering how to make the following output conditional i.e. would like a checkbox the editors can tick to include/exclude personal email address output

    I tried a composite tag but that did not work and cannot work out how to inclue a simple yes/no option in the template - any help gratefully received


    template reuses staff first name last name to output a personal email address, so I need something to make that output optional


    <a href="mailto:<perch:content id="staff_name_first" type="text" label="First name" html="false" />.<perch:content id="staff_name_last" type="text" label="Last name" html="false" />@nvc.cc"><perch:content id="staff_name_first" type="text" label="First name" html="false" />.<perch:content id="staff_name_last" type="text" label="Last name" html="false" />@nvc.cc</a>