Hi!
I have created a table in a View that display a list of companies sorted alphabetically. My companies are stored as a CCK type that I have set up with some special fields.
I would like to extend my listings to include an linked alphabet on top of the listing pages. If one click the link a in the alphabet I want to display companies with a name starting with a. If one clicks b - display only companies with a name starting with a b etc.. Check this image for a sketch of what I want to do: http://olalindberg.com/forumContents/drupal/071022_SketchForCompanyListi...
I tried to use this guide: http://drupal.org/node/74715 but I can't get it to work. I don't understand whats meant with this paragraph:
To accomplish this, I first created a view called 'sitemap' with an url of 'sitemap', a title of 'Site Map', and a page display set to display as a list, used the node title as a field, and set it up to display 30 items to be sure it could at least display the whole alphabet on one page. I gave it a taxonomy argument with an option of '1' (meaning group it by the first letter of the term) and set it up to display all results, sorted ascending. I then created a second taxonomy term argument, everything the same as the first one, but with the option field left blank, meaning that it should group the nodes that matched the first argument by the complete taxonomy term name.
Thanks in advance!
Comments
Views Alpha Pager
Did you try the Views Alpha Pager module? I think it fits your needs.
That module did exactly what
That module did exactly what I needed. I had installed this module before (from some recommendations) but hadn't gotten it to work.
Here is what I did to get it working:
Thanks a lot!
Thanks
I had the argument working before but when i upgraded all my modules and to Drupal 5.7 it broke. Added the Alpha mod, removed the existing argument, and that was it to get it working. I like the facility for filtering common words like A, the, and An, etc.
www.iofilm.co.uk - Not a Drupal site yet!
Cool
Very helpful in making Drupal at like a wiki. Thanks.
Views Alpha Pager
Very helpful, thanks!
Views Alpha Pager perfectly
Views Alpha Pager perfectly works!
Sort Criteria: It is obligatory attribute for Views Alpha Pager!
Not important how many node in page. Also it is not important Fields and Filter. The main thing to specify criterion of sorting. For example: Node Title!
What a pity, does not work with the Russian alphabet!
It's hard to understand the one who is keep silence!
We need this updated to
We need this updated to version 6
subscribe
subscribe - need a D6 version
For D6 you may use views2
For D6 you may use views2 or glossary modules
glossary doesn't work
maybe I'm missing steps or doing it wrong, but the glossary solution built into views 2 has some issues.
until they get it resolved, or I spend more time figuring it out, I'd recommend following this method ... http://tedserbinski.com/tags/drupal/creating-alpha-pager-with-views-2-an...
Good stuff.
for example, here is my PHP for the header ...
Technical Architect : Philadelphia, PA
adding active classes
Thanks for your code. I added a little bit to it to allow me to theme the active letter. There's probably another way to do this but for now this works pretty well. The only thing I couldn't figure out was how to get an array of the title result of the view to allow me to unlink the letters that don't link to anything. Hence the if statement on the 'x' letter. What I wanted was some sort of isset() check on the array created from a list of nodes limited to and grouped by their first character. But just couldn't make it work with what was available in views.
D6 solution
For anyone interested I have a working solution for Drupal 6 and views described at my blog post.