I am making a website where certain users can create events. They can also create a page with information about their events in general. On the bottom of the general events page, I would like to display all events created by that user.

I am working with EVA do fetch all events. I thought I should make a contextual filter, targetting the author:id(110), but this doesn't work. When I debug, I notice that Views thinks the author id(should be 110) is the node id(=56). Am I doing something wrong?

Kind regards, Tom

1 Answer 1

  1. In the EVA Field display of the View you'll see a section there called "Entity content settings." Make sure the settings there are as follows:

a. Entity type: Node
b. Bundles: select the event type content type that you want to appear at the bottom.
c. Arguments: Choose: "Use tokens from the entity the view is attached to" and then add the following token (with brackets) where it asks for the token: [node:author:uid]

  1. Now set the contextual filter for the EVA field display as follows: Author uid with the following setting: Provide default value: User ID from URL.
  2. Optionally, if you want to include something like "Events created by Jane Smith" at the top of the EVA view, then you need to add a relationship to the User. Then in the "Fields" section add user name and set it to "Exclude from display." Create a header for the view and choose "Global text" and check on the functionality to allow the use of tokens in the text. The user name token will be [name].

That's it. You'll be good.

I think it is worth to note what's a bit confusing here. It might help you to remember next time. a. "User ID from URL" is really a misnomer. It's getting the User id from the node. The user id is not in the URL at all.
b. It feels like the filter/argument is being set twice; once in the Entity settings and then again in the Contextual filter settings.

  • Thanks, your solution works. Note that under Bundles, I had to choose the general event content type. Nov 9, 2014 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.