I am trying to customize the taxonomy term page, the issues I am facing are as follows.
1. If I use the included 'taxonomy_term' view (which is based on node display), the title of the page shows up correctly and displays the term name, the arguments used are taxonomy term with depth and a modifier. The problem here is that under fields, I cannot select any custom fields that I have created on the vocabulary.. they don't show up in the list of possible fields.
2. I tried a new view of the type 'term', here I can select my custom fields for display. The argument I have selected tid and creating a page display, I am able to get everything I need except that I cannot get the 'title' of the page to dynamically display the taxonomy term name based on the tid.. I have tried %1 in the title field of both the display and in the tid argument.. and what I end up with is the numeric tid value as the title.
is this a bug or what am I doing wrong ? Many thanks in advance.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | view-term-type.txt | 3.93 KB | vinsabus |
| #5 | view-node-type-working.txt | 7.97 KB | vinsabus |
Comments
Comment #1
Jarek_Sz commentedSubscribe
Comment #2
bojanz commentedCan you please update to 7.x-3.x-dev and retest?
Alpha1 is too old to debug against.
Comment #3
Jarek_Sz commentedI have the same problem in 7.x-3.x-dev
Comment #4
bojanz commentedOkay, good to know.
Comment #5
vinsabus commented@ bojanz
I tried the same with the latest dev downloaded today and the issue remains the same even though, yesterday I managed to find a way of getting the title to display correctly along with the custom fields added to the taxonomy term, using the default taxonomy term view shipped along with views.
The solution was to use a relationship on the term reference field I created on the nodes. This exposes the custom taxonomy fields also in the list of selectable fields for the display.
Perhaps this is just my inexperience with views and this is how it is supposed to work, but it just seems a bit counter-intutive to not have access to taxonomy fields when one is using an argument of taxonomy terms or overriding taxonomy term pages. Also sort of when does one use a term view as opposed to a node view ? Why isnt taxonomy term id with depth argument availible for term views ? These are just questions that come to my mind as newbie, since D7 allows one to add extra fields to terms I would imagine most people would want to be able to display those fields in the default taxonomy term view.
I am attaching two views one a taxonomy term view and the other one which works based on the included default taxonomy term override view. Many thanks for your attention
Comment #6
bojanz commentedOkay, I now understand your problem :)
You select a view type (or in views terminology, a "base table") depending on the main thing you are displaying.
You use a node view when displaying nodes. This is the most common view type that you will use.
If you want to be able to access fields attached to taxonomy terms, you need to add that relationship to taxonomy terms. Same for every other entity type.
For Views to add it automatically for you would be an unwanted performance hit for the people who don't need this every single time they create a view (it's two clicks away).
Every time you are accessing fields outside your base table (such as Nodes), you need a relationship.
Note that terms are attached to nodes, so having some of the node&term arguments / filters on terms themselves might not make sense. Still, the "taxonomy term id with depth" argument could probably be provided for term views as well, so that's an okay feature request.
It does seem a bit confusing, but that's because of the way terms, fields, entities, etc. function in D7, and Views is just following its patterns.
Comment #7
vinsabus commentedThanks a lot for explaining this so clearly, I was going bonkers because I wanted to be able to use display suite to customize the layout of the taxonomy term pages. I was able to do this with row style display suite for the taxonomy term view but was going bonkers because I was not able to get a title to display properly. I could get a listing of node titles in the sidebar using a relationship in that view.
Between the two types of views using display suite, I guess one has to choose between custom display modes for the nodes or for the taxonomy term pages.. It would be nice to choose the route one wants to take and would be great to have the taxonomy term with depth filter available to taxonomy term views so one could get a title in there :)
Comment #8
bojanz commentedOkay, checked out that filter/argument.
It works on the table that connects nodes and terms, so you either need to have a node view, or a term view with a "Taxonomy:Content" relationship.
I'd personally go with a node view and work from there, but it's your choice. Good luck!
Comment #10
vinsabus commented@ bojanz : I'm sorry i did not see your reply earlier and many thanks for checking this out. And yes I can confirm that in the dev version of views I am able to get the title to display properly in the term view.