Hi,

We are trying to create a following type of view.
We have 20+ clubs. More clubs can be created in future by client. We created a content type for club with fields like Club name, description & logo.

Each club publishes its own magazine. So another content type MAGAZINE is created with fields title, upload pdf, date of publishing, and "Publisher Club Name", which is a dropdown reference link of all club names.

Now, we want to show a block of Magazines on each club page. So we created a view of all magazines published by all clubs.
We are trying to show only those Magazines on club page, that were published by the same club. Other magazines should not be shown on the club page. So I think, we should use the contextual filter here.

But the main problem is how to match the club-name in URL with "Publishing Club" field in Magazine content type? When this matches, only that club's magazines will be shown in the view.

e.g. We have ABC & XYZ clubs.
On ABC club page (url: sitename/ABC), we want to show the magazines published only by that club ABC. Other magazines by XYZ club, should not be shown.

Thanks
Ashish Naik

Comments

Dirst’s picture

If you are showing club page as node with path alias like /club-name. Then there is node id already passed and there is no problem to select "provide default argument -> php". And write "return arg(1);" for contextual filter of type field reference for club