CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Add image custom field to ICalendar template file
Pages: [1]

Author Topic: Add image custom field to ICalendar template file  (Read 544 times)

fpoisson

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.5.6
  • CMS version: Wordpress 4.1.1
  • MySQL version: 5.4.34
  • PHP version: 5.5.41
Add image custom field to ICalendar template file
March 17, 2015, 07:54:18 pm
Hi,

I am trying to customize my event list page.

For now I have succed to modify it and have what I want.

Code: [Select]
{foreach from=$events key=uid item=event}

<h2><a href="{crmURL p='civicrm/event/info' q="reset=1&id=`$event.event_id`"}" title="{ts}read more{/ts}"><strong>{$event.title}</strong></a></h2>
        <b>Quand?</b>
        {if $event.start_date}{$event.start_date|crmDate}{if $event.end_date}<em> {ts}through{/ts} </em>{strip}
            {* Only show end time if end date = start date *}
            {if $event.end_date|date_format:"%Y%m%d" == $event.start_date|date_format:"%Y%m%d"}
                {$event.end_date|crmDate:0:1}
            {else}
                {$event.end_date|crmDate}
            {/if}{/strip}{/if}
        {else}{ts}(not available){/ts}{/if}<br>
<b>Ou?</b>
{if $event.is_show_location EQ 1 AND $event.location}{$event.location}{else}{ts}(not available){/ts}{/if}<br>
<b>Quoi?</b>
{if $event.summary}{$event.summary} (<a href="{crmURL p='civicrm/event/info' q="reset=1&id=`$event.event_id`"}" title="{ts}details...{/ts}">{ts}read more{/ts}...</a>){else}&nbsp;{/if}<br>
{/foreach}

Here it is: http://www.lafabriquecoop.org/?page=CiviCRM&q=civicrm/event/ical&reset=1&list=1&html=1

What I would like to do is have an image showing up for each event on this page.

I have created a custom field called Image in a custom group called Image which is associated to CiviEvents. I am now having an image for each events.

How can I add a custom field to this page? I have tried looking for many ressources online but cannot succeed to do that.

http://wiki.civicrm.org/confluence/display/CRMDOC/Using+Custom+Data+with+the+API

Thanks for helping.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Add image custom field to ICalendar template file

This forum was archived on 2017-11-26.