Drupal clean urls on custom page GET request.

Posted by calebthorne on Stack Overflow See other posts from Stack Overflow or by calebthorne
Published on 2010-04-14T17:59:59Z Indexed on 2010/04/15 0:23 UTC
Read the original article Hit count: 470

Filed under:
|
|
|
|

I have a drupal page (content type page) that should accept GET values using clean urls.

I put the following code in the page body using the php code input format.

<?php
  $uid = $_GET['uid'];
  $user = user_load($uid);
  print $user->name;
?>

Now the following link http://www.example.com/mypath/?uid=5 results in user 5's name being displayed. Great.

My question is: Can this be accomplished using clean urls such that going to http://www.example.com/mypath/5 has the same result? (Similar to using arguments in views)

© Stack Overflow or respective owner

Related posts about drupal-6

Related posts about drupal