0

Note: as a neophyte user, I'm not allowed multiple links or images. It has been suggested that I edit my original content in order to add updates. Also it's been suggested to edit the hyperlinks so they're not quite right. Hopefully you can sort out what's going on.

I've been following this post by Kristin Brinner "Drupal Tutorial: Use Views to Create an Alphabetical List of Taxonomy Terms" (at h ttp://getlevelten.com/blog/kristin-brinner/drupal-tutorial-use-views-create-alphabetical-list-taxonomy-terms) but my sample does not produce the results illustrated and by now I'm very confused.

Part 1: said to create new view showing taxonomy terms, display in grid format and create menu link. Done.

Part 2: grouped terms alphabetically (add Taxonomy term: Name, label it "Grouping", exclude from display, rewrite to max length = 1 and uncheck 'trim on word boundary' and 'add ellipsis'). Under Grid-Settings use "Grouping" apply to all displays. My view looks like the sample. Done.

Part 3, Create a Views page for each letter of the alphabet: said to add a Contextual Filter: Taxonomy term: Name. When the filter value is NOT in the url, display all results for specified field. Under More, click Glossary mode, character limit = 1. Note that I now have a Taxonomy term: Name in the Contextual Filter section. I don't know how to test these results.

Part 4, Create A-Z list (create a block that will display the list of first letters in a cute list above the grouping grids) says to add a new Contextual Filter for this block (override). When the filter value is not available, 'display a summary', sort by alphabetical, unformatted, display record count and display items inline. This isn't working as predicted, here is what the tutorial says should be the result: Image 1 in the diagram (h ttp://imgur.com/l9TbLyv). My content continues to look the same as it did previously in the exercise, i.e. like this: Image 2 in the diagram. However when I put "S" into the Preview with contextual filters, I get: Image 3 in the diagram. I was asked for screenshots, so without contextual filters is h ttp://imgur.com/zXCnsvA and with "s" in contextual filters is h ttp://imgur.com/7DF6UUD .

When I created the new contextual filter in Part 4, I got a copy of what was in the Page, so I have two contextual filters, both with Taxonomy term: Name. If I delete the first contextual filter from the block, then my preview shows the same information as Image 1 in the diagram. I think I'm missing something &/or the blog post is unclear. Should I have started "this block override" with 0 contextual filters? I.e. Should I have started by deleting elements from the page which were copied into the block?

Part 5 instructs to "Add the alphabetical list on our page with the grouped terms and Go back to our Page display".

I've got the view working correctly now. The thing which stumped me was that adding a block created an entire copy of the original page which (philosophically) I don't understand. When there's a page and a block override which give instructions about the view, how does drupal know which instructions to pay attention to?

Thanks to all the folks who have helped.

5
  • This is Kristin Brinner's blog post getlevelten.com/blog/kristin-brinner/…
    – TdeV
    Commented Mar 27, 2016 at 1:10
  • Hey @TdeV, could you add/post a screenshot of your View/Block configuration for Part 4? When editing that view-block, you should be able to see the "cute" list, do you? Commented Mar 29, 2016 at 5:02
  • @StefanosPetrakis I can't figure out how to add a view to the comment field or how to add another-question/more-discussion to the original question. Do you have any idea how to find Q&A on this site's behaviour?
    – TdeV
    Commented Mar 29, 2016 at 18:35
  • That is meta.drupal.stackexchange.com you would be looking for. I had the feeling you could update/edit your original question though, would expect that would be directly available to the original poster. Commented Mar 29, 2016 at 19:09
  • @StefanosPetrakis, thanks. Because of my "neophyte" status I am limited to two images on the first post, so I'm looking for a new way to add a comment which connects to images.
    – TdeV
    Commented Mar 30, 2016 at 1:04

1 Answer 1

1

I am posting here in return, my block configuration, you will see that your contextual filters differ from mine, and for that matter, from what the tutorial describes.

enter image description here

Whatmore, the tutorial from Kristin Brinner describes in "Part 4. Create A-Z list" how to set up this block, which is what I did and got the expected result.

I would suggest you go through that part in the Tutorial again, the block you have at the moment is not configured according to the instructions of the tutorial.

And a useful quote from the Views 3 Handbook (accessible via Advanced Help):

Each display can have its own settings, but when created, a display will take all of its basic settings from the default display which all Views must have. For most settings, there is an override button that will override that single setting for the current display. Overridden settings will have a mark in the summary for that display. All 'default display settings' are shown in the other displays in 'italic'. When you override a setting, then it is shown 'normal'.

Will keep an eye on this post! Best of luck!

6
  • I don't see how this is true. The first and second contextual filters are both "Taxonomy term: name" but renamed per Johann Falk's advice. This is the third post I've made for this View. Earlier I asked if the items in the Page were duplicated in the Block, or should I delete the contextual filter which was part of the Page?
    – TdeV
    Commented Mar 30, 2016 at 16:15
  • @Clive. I added the screen views because StefanosPetrakis asked for them and as a neophyte user of Drupal Answers, I can't post the views in the first question. I have to complain about the number of hours I've spent trying to get this data posted!
    – TdeV
    Commented Mar 30, 2016 at 16:18
  • Hello @TdeV, I was just trying to figure out what is the status of your question, but it seems your comment where you said you managed to solve the issue by removing the duplicate Taxonomy Term: Name contextual filter is gone. So, I am curious, did you manage to solve this in the end? Commented Mar 31, 2016 at 22:15
  • Hi @StefanosPetrakis, I have completely edited my original question, per someone's suggestion, so it includes my up-to-date status. I have got the view working exactly like the tutorial but I'm a bit mystified about how that came about; I guess the original tutorial glossed over this. I created a block and it copied all of the elements of the original page. Why? Why does Drupal have the instructions in the Page and duplicated again in the Block?
    – TdeV
    Commented Apr 1, 2016 at 0:33
  • 1
    Hey @TdeV, took some time to get back to you about this. It's a good question, and is luckily also documented in the Views documentation. I quoted the specific excerpt from that docu in my answer. I think you should also inform the tutorial author to extend the tutorial with a similar word-of-caution, since it caused you such trouble. And finally, in case my answer helped you solve your problem, you should accept it. Commented Apr 7, 2016 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.