1

I have type Article that refers one user with entity reference.

article1 refers to user1 article2 refers to user1

I want a Rule to show a message on user profile with all the articles that refer to this user. Is it possible without coding?

2

Finaly i found the solution to this problem using module Views Rules.

I create a view of users, i pass the nid as an integer and set a content referencing to the user.

I don't know if there's a better way but this works fine.

0

Yes, it's an action called "fetch by property" where you select the entity reference field and provide the uid. That return a list for rules to loop over. You could then display these with a site message.

I think you're looking for views here though. I can't see much benefit from using rules.

  • I can´t fetch a node (article) from a Rule launched under event (User account page is viewed) or at least i don't know how. – angoru Mar 28 '16 at 8:53
0

Yes, it is possible to perform an action on referenced entities via the drill down syntax entity:uid:entity.

However you are asking to display all the articles referenced by a user and that isn't an action. It is context.

What you are looking for is a views list.

  • I don´t want de articles written by but referenced by. The author could by another user. – angoru Mar 28 '16 at 8:52
  • Doesn't matter. You are still looking for a view. I'll replace written by with referenced (written by is an entity reference field). – Eyal Mar 28 '16 at 9:22
  • I now it can be done by a view, but I need the Rule that do this although i still need a rule able to use referenced content – angoru Mar 28 '16 at 9:29
  • @angoru again, rules perform actions based on events. Views (can) display lists of entities. – Eyal Mar 28 '16 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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