Drupal Questions & Answers

Ask and answer Drupal related questions! No question too simple or complex!
arilikeairy's picture
Asked by on Tue 20th Jan 2009
I'd like to create a custom block using Views 2 in Drupal 6.

I’d like to create a custom block using Views 2 in Drupal 6. I want the block to show up only if the URL is user/* or users/* (which I can do with the block module). I can’t figure out how to (1) grab information from the URL or (2) use the info to print a link.

Here’s what I’d like it to be:

text linked to: users/[uname]
different text linked to: user/[uid]/profile/xxx
still different text linked to: user/[uid]/profile/yyy

I need to grab either the [uname] or [uid] from the URL (and then use one to find the other), but building arguments in views is really confusing me. And…after I get the arguments, how do I use them to print a link?

Can anyone help me?

Thanks a ton!

Commenting on this Drupal Question is closed.