New Podcast

Posted Friday, August 27 at 12:18 pm

Listen in as Ryan, Mike, and special guest Todd Tomlinson from ServerLogic discuss Drupal news from the past week. Todd is the author of Beginning Drupal 7 from Apress Publishing. Rather than going with a standard interview with Todd, we decided to ask him to join us for one of our news-based podcasts. Listen in as we talk about Drush, Examiner.com, Todd's current and future book, and a bunch of other Drupal-related stuff.

Download Podcast 43
DrupalEasy_ep43_20100815.mp3
Syndicate content

NEWSLETTER

Stay informed on our latest news!

Syndicate content

Testimonial

On March 11th I attended the first DrupalEasy Workshop in Orlando, Florida. I'm an experienced web developer who has recently picked up Drupal as a tool for helping to build high quality content-driven websites. Mike and Ryan were excellent teachers - they gave a thorough overview of a complex topic in a short space of time, and provided plenty of resources for us to continue learning. The workshop is essential for anyone who has previously configured a basic Drupal site and wishes to take their skills to an advanced level. I would not hesitate to recommend DrupalEasy.com training and hope to attend more workshops in the future.

Who are we?

DrupalEasy is the collective expertise of Ryan Price and Michael Anello, who joined forces to provide training and consulting services worldwide. Read all about them and what they can do.

What is Drupal?

Drupal is a free, super-powerful content management system for sites that require information posting and collection, including blogs, forums, videos, photos, and databases of information. We think it is the best platform available. Here's why...

Why Drupal?

More and more savvy organizations are going with Drupal for content management, and its no mystery why. It’s free, flexible, and easy to maintain for small or large volume sites. Learn more...

Showcase a User's Comments with Views and Menu Tabs

By now, you should know and love the Tracker module that comes with core. It has its strengths, but many weaknesses. For one, you can't separate out posts from comments, or sort the list in interesting ways. Views can help you make exactly the list you want, and place it in a tab on the user's profile exactly like the "Track" tab.

For this example, you'll be adding a list of comments. Creating the view is simple enough:

  1. Clone the default view comments_recent, and call it comments_by_user
  2. On the Page display, add a Relationship for Comment:User
  3. Add an Argument for User: UID and choose Relationship: User (assuming you did not re-name the realtionship)
  4. Before saving the Argument, set the Action to take if argument is not present to be "Provide default argument", then choose "User ID from URL"
  5. Change the page's Path to "user/%/comments"
  6. Give the page a Menu entry by clicking the text that says "No Menu" and choose "Menu Tab", then name the tab "Comments"
  7. Make sure you save the view
  8. Visit any user's page, and you should now see a "Comments" tab next to "View"

For more information about creating views with Relationships, read Mike's article.

Trackback URL for this post:

http://drupaleasy.com/trackback/213
No votes yet

1 comment

Guest wrote 51 weeks 5 days ago

Thanks

I was just boggled trying to find the UID argument on a comment view and turned to Google, which brought me here. Working great, now, thanks. :)

Michelle

Syndicate content