I have a portfolio view; the portfolio displays all the nodes of the portfolio content type in a grid and, basing on the selected term of the tags above, shows the associated content in images and titles and some description.
I'm adding the view block of the portfolio in the Tags page (taxonomy-term.tpl.php).
How can I get the term from the URL and make the view show only the child terms of that term?
Yes, you can: In your block-view's admin page, look at the Advanced section; click to add a new "Content: Has taxonomy term ID" contextual argument. From the section "When the filter value is NOT in the URL," choose "Provide default value "; then, select "Taxonomy term ID from URL."
This should do the trick.
Related
I am new to Drupal and I have been trying to figure out how to create a field in Drupal 7 views to group my content by a specific taxonomy term. I've already attempted to use the vocabulary this taxonomy term belongs to, but it will also group with other taxonomies under the same vocabulary, which I don't want to do. Essentially what I want to do is this:
Vocabulary
taxonomy term parent (show)
taxonomy term child
taxonomy term parent (ignore/hide)
Right now I can select the vocabulary for the field as content: [vocabulary], but what I want is content: [vocabulary > taxonomy term parent (show)]. How do I do this?
This can be achieved with a relationship using the following steps:
Add a relationship to the view, select "Taxonomy term: Parent term" and call the relationship "Parent" (Identifier)
Add the field "Taxonomy term: Rendered Taxonomy term"
In the field settings under Relationship, select "Parent"
In the Format settings add "(Parent) Rendered Taxonomy term" as Grouping field Nr.1.
This will grouped the child terms under their parent terms. Make sure your view is of Taxonomy terms and not Content. You don't need to use the Rendered Taxonomy term field, as long as you select the Relationship in field settings you can control which fields are rendered.
I would like to link the taxonomy term image to the taxonomy term page, the option is available in the field of the taxonomy term name but not for the taxonomy term image in the view...
Thanks!
Depending on the version of your views module you can try following solutions:
Add your taxonomy picture as a field and set it 'link to taxonomy page'
First add your taxonomy link as a field and set 'hide this filed'; than Add your taxonomy picture as the second field and go to field Rewrite and set 'provide link to this field' (or similar) and add the first field into the link input filed there. (you might need to install Token Module to do this)
In Views (Drupal 7), how do I generate a list of terms from my taxonomy list called tag?
It's not clear from your question if you just want Views to display all the terms in the Tags vocabulary or if you are asking about generating a list of tags used to categorize content (for the latter, it would be a "Show content of type x" (i.e. "Node view").
If all you want is to show all the tags in your Tags vocabulary, you create a View to "Show Taxonomy terms of type Tag". You'll find options to create page or block displays. There are several "Display format" options:
Grid
HTML List
Jump Menu
Table
Unformatted list
If you click on "Continue and edit", you'll find that, by default, the terms in the list are links. Clicking them takes you to a display of "teasers" for any content tagged with the term. You can adjust the sort order, add filtering, etc, and continue to tweak your displays.
Here is a screenshot of the initial step for creating a View of Taxonomy terms:
I have a view that displays a group of "featured" nodes of different categories (taxonomy terms). These featured nodes can be ubercart products or just a generic node with an image and, maybe, some text.
They show up one by one, as a slideshow (Views Slideshow module) inside a block on the front page. This view is based on the new_products view from uc_views module.
Each node shows up as an image linked to to the node and, when a product, a buy button under the image.
I want some of these nodes to go, when clicked, to a taxonomy term page instead of the node "page".
How can i do that? If you need more details, feel free to ask.
Inside Views, for a field you can configure it to 'Output this field as a link', then set the 'Link path' by using the 'Replacement patterns' tokens provided.
You will need to make sure your view has a field for the 'Taxonomy: Term ID' and its weight is further up the list than your image field.
You'll set your image field's settings to 'Output this field as a link', then set the 'Link path' to e.g.
taxonomy/term/[tid]
Just be sure to use the proper 'Replacement patterns' tokens provided by your view.
I need to have terms related to a specific vocabulary use a custom view I have set up.
For example: I have a vocabulary called "Book Categories" with terms under it such as Humor, History, etc. When navigating to a term page (taxonomy/term/7), I would like to display just the book title and a custom book-cover field. By default, Drupal displays node title, teaser, and links on all taxonomy term pages. The problem I am having is I would like terms that fall under the "Book Categories" vocabulary to use my custom view, and all other terms to use the default view.
Is there a way around this? Any help is appreciated.
You can clone default taxonomy view and change fields section as you like.
In PAGE SETTINGS->PATH remove "%" and add taxonomy number of your Book Category (like "7")
In contextual filter delete all filters.
This view then should override default view.
Hope this helps.
There is a new module called Taxonomy Views Integrator that seems like it does what you want to do. Try it.