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 Drupal Modules (Moderator: Donald Lobo) »
  • Drupal Views and CiviEvent images
Pages: [1]

Author Topic: Drupal Views and CiviEvent images  (Read 568 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Drupal Views and CiviEvent images
September 30, 2014, 09:08:28 am
I have a Drupal View that lists the next 5 upcoming CiviEvents, along with the usual link to the event information page.  In the list of 5 upcoming events, I would like to display a small image for each event, which will be added by the event organizer.

What I have done so far: 
- I added a custom data set that is defined as "Used For ... Events" 
- In this custom data set, I added one custom field of type "file". ( this part works as expected, the event organizer is able to upload an image for each event as they are configuring a CiviEvent.)
- The image does show on the event information page as expected. (The URL for the image src tag is: http://myorganization.org/civicrm/file?reset=1&id=71&eid=6 )

But I am unable to get the Upcoming Event View to display this image inline.  In fact, I cannot even get the image to display when I paste the image URL to a new browser tab.  (BTW: When I used Drupal Views to do an inline display of contact images, that worked fine)

Any ideas/approaches are appreciated.
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Drupal Views and CiviEvent images
October 02, 2014, 04:38:44 am
How did you do it with Contact images? That same method fails here?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Drupal Views and CiviEvent images
October 02, 2014, 01:42:00 pm
Hi - great approach.  this is what I've been doing too.  have you tried a views rewrite with an <img> tag?  I believe the way it works is for the file upload to put it on the server and the custom field is a URL to the file. 

Caveat - I have been using https://www.drupal.org/project/civicrm_entity rather than views integration (incredible if you do a lot in drupal) so I may be mistaken.  In that case would suggest you use it instead.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Drupal Views and CiviEvent images

This forum was archived on 2017-11-26.