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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • EventInfo template can't display event type
Pages: [1]

Author Topic: EventInfo template can't display event type  (Read 4091 times)

Barnacle

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 2
    • White Fuse Media
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.3
EventInfo template can't display event type
August 05, 2013, 03:08:45 am
Hi,

I'm trying to edit the template for event info, EventInfo.tpl, so that it displays the event type alongside location and other data.

However, The element {$event.event_type|crmICalText} doesn't render anything, despite that being the same syntax used in other templates (e.g. iCalendar.tpl).

How do I access the event type variable for displaying in event info pages?
--
http://whitefusemedia.com/

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: EventInfo template can't display event type
August 05, 2013, 03:19:44 am
Hi,

add {debug} in the template, it will open a pop up window that contains the details of what variables are available to the template

you don't need to add the "|crmICalText" to simply display the variable data

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Barnacle

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 2
    • White Fuse Media
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.3
Re: EventInfo template can't display event type
August 05, 2013, 03:28:52 am
That's really helpful; thank you!

the popup tells me I have access to $event.event_type_id but nothing else. Is there any way to use this variable within the template to acquire the name of the event type? If not, how do I make  more variables available to the template?
--
http://whitefusemedia.com/

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: EventInfo template can't display event type
August 05, 2013, 12:32:30 pm
This seems like something that should be available to the template. It was an easy change so I've implemented for the 4.4 release:
https://github.com/civicrm/civicrm-core/pull/1342
http://issues.civicrm.org/jira/browse/CRM-13158

You can patch your site from here if you want:
https://github.com/civicrm/civicrm-core/pull/1342.patch
Protect your investment in CiviCRM by  becoming a Member!

Barnacle

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 2
    • White Fuse Media
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.3
Re: EventInfo template can't display event type
August 06, 2013, 01:45:25 am
Works like a charm; thank you!
--
http://whitefusemedia.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • EventInfo template can't display event type

This forum was archived on 2017-11-26.