Wednesday, 11 July 2012

Create a View with an Alpha Pager

  1. First, create a new page view and set your path to “directory”
  2. Assuming you want your pager to be based on the nodes title, add in an argument: “Node: Title”
  3. Set title equal to: “Directory: %1”
  4. Action to take if argument is not present: “Display all values”
  5. Check “Glossary Mode”
  6. Set character limit to “1”
  7. Case: “upper case”
  8. Case in path: “lower case”
  9. Save and update
  10. Add in a header under basic settings
  11. Set up your alpha pager:
    1. <div class="alpha-pager">
    2.   <a class="alpha-page" href="/directory/a">A</a>
    3.   <a class="alpha-page" href="/directory/b">B</a>
    4.    ...
    5. </div>
    Note: if you have PHP filter enabled, you can set up proper links using l(), otherwise use basic HTML

No comments:

Post a Comment

Thank you so much for providing your valuable feedback. I will will look into them and update my skills & technologies accordingly.