Forum

Thread tagged as: Question, Problem, Events

Calendar /event settings

At present I have showing Time/Day/Date/Event can I change it to Day/Date/Time (and add start-end times)/ Event. Also I would like them to start and end on a operate line instead of running after one another as it's in a slim column and difficult to read. This is not in the calendar but on the home page as per:

    <?php
    $opts = array(
    'value'=>implode(', ', array(
    date('Y-m-d 00:00:00'),
    date('Y-m-d 23:59:59', strtotime('30 DAYS'))
    )),
    'filter'=>'eventDateTime',
    'match'=>'eqbetween',
    'count'=>2,
    'template'=>'events/listing/event-day.html'
    );
    perch_events_custom($opts);
    ?>
David Roberts

David Roberts 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Those sound like template changes - can we see your template?

  <perch:before>
      <li>
          <h3><span class="day"><perch:events id="eventDateTime" format="l, jS F Y" /></span></h3>
          <ul>
  </perch:before>

  <li class="vevent">

      <span class="event summary <perch:events id=" category_slugs " />"><a href="<perch:events id="eventURL" />"><perch:events id="eventTitle" /></a></span>
      <span class="time dtstart"><span class="value-title" title="<perch:events id="eventDateTime" format="c" />">
  <perch:events id="eventDateTime" format="%l:%M %p" /></span> - </span>
      <div class="description">
          <perch:events id="eventDescHTML" encode="false" />
      </div>
  </li>

  <perch:after>
      </ul>
      </li>
  </perch:after>
Drew McLellan

Drew McLellan 2638 points
Perch Support

At present I have showing Time/Day/Date/Event can I change it to Day/Date/Time

The format of the date is controlled by the format attribute, e.g.format="l, jS F Y". You can see the possible date codes here: https://php.net/manual/en/function.date.php

Also I would like them to start and end on a operate line instead of running after one another as it's in a slim column and difficult to read.

I'm not sure what you mean by an operate line, but you should be able to add any HTML to the template that you need to control the layout with your CSS. The template is your domain - feel free to update any HTML and move the tags around. Make it your own.

Thanks.

My typing should have been 'separate line'.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ah! I thought it must have been an auto-correct, but couldn't work out what! :)