开发者

Display link to nodes who reference a user in a custom usertype view

开发者 https://www.devze.com 2023-02-22 00:41 出处:网络
In my website, I have a node type called \"Project\". Node type \"Project\" has a field called Project Author, which is a user reference.

In my website, I have a node type called "Project".

Node type "Project" has a field called Project Author, which is a user reference.

Now, when I hit "reverse link" in the field settings, a link to all "Project" type pages that refer that particular user appears in the default "view" user page (ex: domain.org/user/123/view) under "Related content"

This is the effect I want. The problem is that I'm using a custom made view as default landing user page.

So, my question is, how can I add the "Related content" block to a custom usertype View (in Views2), so that I can show a link 开发者_开发知识库to all project pages that refer that particular user?


There's also a patch for CCK (6.x) which can achieve this in a single view.


I found the answer using another module: Panels3! Here's how...

VIEWS2 MODULE:

  1. I created a view of user type, using UserID ans argument.
  2. I filled the fields with the stuff i needed.
  3. Then I created another view but node type this time.
  4. In the arguments I used the field "Project Author", a user reference field type.
  5. I populated the fields with node title.

PANELS3 MODULE:

  1. Created a User profile template panel.
  2. I added the two views together

Voilá!

Hope this helps someone with the same problem as I.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号