[DUG-TO] Passing arguments to Views

Andrew Berry andrewberry at sentex.net
Thu Jun 18 13:11:17 EDT 2009


On 18-Jun-09, at 12:57 PM, Evan Leibovitch wrote:

> I have a cck content type, "authors", and another one called  
> "reports".

Yes, Views is the answer :)

Typically I've approached this where the author nodes are content  
profile nodes.

- Create a page view with a path such as users/%1/reports

- Set the view to include a list of report nodes as normal, with an  
argument setting tied to your user reference field. Depending on if  
you do a UID or user name, you may need to write a little bit of PHP  
code to massage the argument into what you want. That's especially  
likely on Drupal 5. There's a lot of documentation online for this as  
it was a common use case of argument PHP code in Drupal 5.

- Either put the view in your menu system as a tab (so it shows up on  
all pages), or just theme in the link into your author node template.

Good luck!

--Andrew

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2672 bytes
Desc: not available
URL: <http://lists.openject.com/pipermail/dug-to/attachments/20090618/f7294763/attachment.bin>


More information about the DUG-TO mailing list