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) »
  • A block of your events
Pages: [1]

Author Topic: A block of your events  (Read 891 times)

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
A block of your events
October 18, 2012, 12:27:55 am
I'd like to create a block that will show a user all the events they have signed up for through CiviEvents. I have the fields and sorting all set up in Views, but I can't seem to find what I would need to that only that person's events would show up in the block.

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: A block of your events
October 18, 2012, 01:55:27 am
sounds like you would need to be pulling in a Contextual Filter based on the 'current drupal user' that might need to be itself using a 'relationship' that is tieing the civicrm user (ie the participant) to the Drupal User linked to it?

Sorry for brevity but may be enough to nudge you towards the next question ;)
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

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: A block of your events
October 18, 2012, 02:31:18 pm
That's what I was looking for, but it wasn't an option (pretty much only items in CiviCRM are options). Do I maybe have to not do it as a CiviCRM view?

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: A block of your events
October 18, 2012, 02:38:49 pm
i assumed the Block we were talking about was from Views - yes it needs to be
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

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: A block of your events
October 18, 2012, 02:58:05 pm
It is in Views, but it's a CiviCRM one - where you choose "CiviCRM Events" as the content to show on the first page of creating the View.

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: A block of your events
October 19, 2012, 02:32:40 pm
you need to string several bits together  - i may wrongly assume you can start from several points in the chain
drupal user - civicrm contact - civicrm participant - civicrm event

here is a view starting from User.

Has a Contextual Filter to get the User ID from logged in User.
Uses a Relationship to get the Event ID from the Participant (from the Civi contact from the User)

To check it works in Preview add the User ID in to the Auto Preview field

I was getting duplicate results - can't spot why so resorted to using Distinct in the Query Settings. Hopefully someone will point out the error of my ways.

I hope I have stripped out anything that might conflict so you should just be able to import this

Hope this helps
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

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: A block of your events
October 24, 2012, 03:13:54 pm
Thanks! Trying this out now.

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: A block of your events
October 24, 2012, 04:23:43 pm
Worked perfectly! I just went in and made a few small changes, such as linking the title to the event's info page. Using Display Suite I was able to add all of this to the My Account page so that people can easily see their events. I also added a second block to the view that pulls membership information so they can also see their membership type, when it expires, and its status.

I've always wanted to be able to have info like this on the My Account page and now I know how to do it. Thanks a lot!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • A block of your events

This forum was archived on 2017-11-26.