[support] extracting author's UID from URL for use in a block

Neil: esl-lounge.com neil at esl-lounge.com
Wed Jun 25 07:37:41 UTC 2008


I have given my blog entries URL's in PathAuto like this: /blog/5/200806/389 where:

5 is UID of author
200806 is June, 2008
389 is nid

I want to create a block on the right margin which will have links such as member's blog, member's recent entries, member's most read blogs, etc which will all link to Views I've already set up.

I thought I could use args to extract the UID from the URL but when I print out all arguments in the block as a test, I get only "node" and "389" so it's not seeing the PathAuto URL but the system URL.

What I was hoping to do, paraphrased, is

where arg0 is blog and arg1 is numeric
arg1 equals $uid
<a href="/blog/$uid">Member's Blog</a>

also though, in that snippet, how would I load the user's name? I guess what I'd really want to do is load the user so I'm able to extract uid, name, picture, etc and use arg1 to do it, but I can't get the PathAuto created URL parameters, only the core system ones.

any help appreciated.

Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20080625/8d889320/attachment.htm 


More information about the support mailing list