At least, that's what I think I'm trying to do. OK, I have a content type called Group and another called Members, and use views page displays to display the different group members at group/[groupname]/members. Since it's basically the same display for each member list, except for the members themselves, all of the pages are coming from one view, also called Groups. So I have a few page displays, such as Group 1, Group 2, Group 3. This is all working fine.

Now what I'd like to do is have a list of Groups that links to the corresponding view. This seems like it should be simple but I can't figure it out, leading me to believe I'm doing something fundamentally wrong or I just don't know how to phrase what I'm looking for. So, what I'd like is a page at mysite.com/groups/members with a title of Group Members and below that a list of all the group names, such as the ones mentioned earlier, Group 1, Group 2, Group 3 and have each of these link to the view of members for the corresponding group (groups/group-1/members, groups/group-2/members, etc.). I've accomplished this by hand by making a regular page and manually linking each Group to its member list but I'd like to avoid doing that. Is this possible?

Comments

figover’s picture

Please write the fields in Group content type and Members content type.

I think, you are using node reference of Group content type into Member content type, but i am not sure.

butler360’s picture

Group content type is basic, just a title and description. Member has various member details. One field in Members is "Group," referenced from Group content type.

dagmar’s picture

Status: Active » Fixed

You can create a view with this options:

Fields:
Node: Nid -> activate "Output this field as a link" -> group/[nid]/members, Activate "Rewrite the output of this field" -> Group [nid]

Filters:
Node: Type = your group content type

This will create the links that you need.

And BTW, you don't need to create differents displays for each group (at least you are displaying different fields, using differente filters, etc) you can use an argument to define the group.

figover’s picture

@damagar, i think if we need to make the url like this -> group/[title-raw]/members , then what will be way?
We can not use group/[title]/members , because title may be same for two nodes of group content type.

Please give ur comments about it.

figover’s picture

Status: Fixed » Active
dawehner’s picture

Status: Active » Fixed

If you have nid as argument, then give [nid] as parameter and all is fine. As dagmar suggested :)

butler360’s picture

So the [nid] value will translate to [title-raw] in the final output (group/group-1/members)? Or will it just stay group/13/members? I know in the generic example I gave it wouldn't matter since I gave them numbers, but say the group is called "Blue Green," would that end up group/blue-green/members?

Thanks for your help by the way, this already helped me out on another site with a somewhat related issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.