Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1006451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:27:51+00:00 2026-05-16T08:27:51+00:00

List -> l_user I have a List node that has a user-reference field (

  • 0
  • List -> l_user I have a List node that has a user-reference field (l_user).
  • Story -> s-user I then have Story nodes that also have a user-reference field (s_user).
  • There is no direct connection between List and Story.

I want to add a view to List that lists all the stories that reference the same user that list references. Basically something like SELECT stories WHERE story.s_user = this list.l_user and l_user is the user referenced in the list this view is on.

So far the view is being filtered by node:type story but I’m not sure what to use (arguments/filter, etc) to link the story s_user to the list l_user.

Is this doable with Views?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:27:52+00:00Added an answer on May 16, 2026 at 8:27 am

    You can do this with a Views argument. What you’re trying to do is filter that list by user, and you get the user to filter by from the node you’re currently on (or more specifically, the node’s user reference field). So what you’ll need to do is supply Views with an argument that is equal to the node’s user reference field.

    To do that, set up your view as normal and as if you were showing every user’s node. So you might have a view that’s like:

    • Page 1 (by User 1)
    • Page 2 (by User 1)
    • Page 3 (by User 2)
    • Page 4 (by User 2)
    • Page 5 (by User 1)

    Where the user is a user reference field on each page called Story user reference.

    Now, under Arguments add an argument for Content: Story user reference. Now, the view will only show nodes that are posted by the user specified in the argument. The problem is, in a block, there is no argument to specify: you need to provide a default argument.

    Still on the argument configuration pane for Content: Story user reference, select Provide default argument under Action to take if argument is not present. You’ll get a variety of options, but none of them are what you’re looking for: the current node’s user reference field.

    So you’ll need to use the PHP code action and use the following code:

    $node = node_load(arg(1));
    return $node->field_list_user[0]['uid'];
    

    This loads a node based on the node ID retrieved from the current page’s path and returns the node’s user reference field (change field_list_user to the name of the user reference field on the list nodes).

    So if I’m on node 17 whose user reference field states user 4, the argument that’ll be passed to the view is 4. The view will then only show nodes in the view who have user references that are also 4.

    Save your view, create a block display, and place it wherever you want. When you visit a node page with a user reference field, the block will populate with the referenced user’s nodes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 543k
  • Answers 543k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Integer objects are immutable, so you cannot modify the value… May 17, 2026 at 6:38 am
  • Editorial Team
    Editorial Team added an answer Use is_array(): foreach($_POST as $key => $value) { if (!is_array($value))… May 17, 2026 at 6:37 am
  • Editorial Team
    Editorial Team added an answer Use .prevAll() and :first, like this: var previousAddEvent = $(this).prevAll(".addEventHidden:first");… May 17, 2026 at 6:37 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a basic Generic List that I want turned into XML so I
I have a Python list, say l = [1,5,8] I want to write a
List Comprehension for me seems to be like the opaque block of granite that
List Comprehension is a very useful code mechanism that is found in several languages,
List comprehensions can be useful in certain situations, but they can also be rather
Any list of Testing frameworks for ActionScript 2.0/3.0 around there?
I have a list of values I want to insert into a table via
I have a model Foo which have a ForeignKey to the User model. Later,
I have a products page list and i am exporting it to a word
I have a little doubt. I need to get a list of the files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.