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) »
  • Creating a "My events" block (Drupal view)
Pages: [1]

Author Topic: Creating a "My events" block (Drupal view)  (Read 369 times)

Carolyn Shannon

  • I’m new here
  • *
  • Posts: 25
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.1.54
  • PHP version: 5.3.5
Creating a "My events" block (Drupal view)
August 14, 2014, 11:04:39 am
I'd like to create a block Drupal 7 view showing the events for which I (the logged-in user) am currently registered. I want this to show on the /user page, so I'm thinking the best way to do this is to create a block view.

Anyone done this? Recipes/tips/better approaches? Thanks!

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Creating a "My events" block (Drupal view)
August 14, 2014, 12:07:48 pm
Here is a D7/Views3 one I prepared earlier ;-) Well actually just did it now as I want to build up a set of simple Views that I can share through our 'treasure trove' - I will add it there once you confirm this fires up for you okay

But the ingredients for the view recipe are (in short)
- View of type 'CiviCRM Participant'
- View Relationships of type CiviCRM Contacts: Drupal ID (which connects the Participant to the Drupal User)
- CiviCRM Drupal match table: Drupal User ID set with Default value as User ID from logged in User (which filters results to logged in user)
- garnished with whatever Event fields you require eg Title, Start Date, Event ID.

Does that work for you?

NB to import a View you must be user1 or masquerade as Admin
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Carolyn Shannon

  • I’m new here
  • *
  • Posts: 25
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.1.54
  • PHP version: 5.3.5
Re: Creating a "My events" block (Drupal view)
August 14, 2014, 07:05:49 pm
Perfect. Thanks so much!
 ;D

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Creating a "My events" block (Drupal view)
August 14, 2014, 07:07:42 pm
Glad it helped. Will continue to add these to our library as they come up time and time again
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Creating a "My events" block (Drupal view)

This forum was archived on 2017-11-26.