SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,710
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Drupal 6.x and a View's Links Returning Incorrect Values

    I'm using Drupal 6.x with a View I created to create an alpha pager and I'm having problems displaying the respective letter-links on the same page that the view is being displayed on.

    The code I'm using to create the links prints the following:
    ...
    http://localhost/projects/blah//projects/blah/node/42/f
    http://localhost/projects/blah//projects/blah/node/42/g
    http://localhost/projects/blah//projects/blah/node/42/h
    ...

    What I would like to have instead is the following:
    ...
    http://localhost/projects/blah/node/42/f
    http://localhost/projects/blah/node/42/g
    http://localhost/projects/blah/node/42/h
    ...

    The code responsible for all this is the following:
    Code:
    <?php
    print l(t('All'), 'the_views_name') . ' ';
    for ($char = ord('a'); $char <= ord('z'); $char++) {
       print l(strtoupper(chr($char)), request_uri() . '/' . chr($char)) . ' ';
    }
    ?>
    Long story short, I need my URLs to look like this:
    http://localhost/projects/blah/node/42/<letter>

    What am I doing wrong here? And for whatever it's worth, this alpha pager code is placed in the header of the View configuration using the PHP Input Filter.

  2. #2
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,710
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •