commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / views / help / taxonomy-page-override.html
1 NOTE: This page has not been updated for 7.x-3.x
2 Views 2 provides a way to override the taxonomy pages of any term. The view is included by default but is disabled. This page covers three minor aspects that some users could use to control the aspect of their taxonomy pages.
3
4 <h3>Background</h3>
5 The Taxonomy module provides a way to organize content through the site. It also presents a page with nodes that belong to some term. The style can't be changed easily and taxonomy only displays node teasers.
6
7 <h3>Force All</h3>
8 When using vocabularies with multiple term levels, a top level won't include the nodes that belongs to the levels inside. Let's clarify this with an example, let's assume the site have this vocabulary:
9
10 <code>
11 Vocab
12 - Term 1
13 -- Term 2
14 -- Term 3
15 - Term 4
16 -- Term 5
17 -- Term 6
18 </code>
19
20 If you go to taxonomy/term/1, then you see all nodes in Term 1 listed, but not nodes in Term 2 and Term 3. If you want to see all nodes in Term 1, Term 2 and Term 3 in a single page, you have to go to
21
22 <code>
23 taxonomy/term/1/all
24 </code>
25
26 Views 2 allows you to show all terms inside another term.
27
28 <h3>Step 1. Enabling taxonomy_term</h3>
29 The first step we need to do is to enable the "taxonomy term" view that views provides for us. After we've done that we need to edit it.
30
31 <h3>Step 2. Changing minor aspects</h3>
32 On the Display: Page, we can change the Style to any of the styles that views provides for us, it could be a table or a list. If we do this it's necessary to add some fields to the view.
33
34 The most important thing we're going to change it's the argument <strong>Taxonomy: Term ID: (with depth)</strong>. At the bottom of the screen, you'll have 2 options, the first one to change it's the <strong>depth</strong>, if we want to do what the <a href="http://drupal.org/project/taxonomy_forceall" target="_blank">Taxonomy Force All</a> modules does, you'll have to set it up for at least 1.
35
36 The next thing you have to do it's check the <strong>Set the breadcrumb for the term parents</strong> option. This will allow your view to show the breadcrumb with all the term levels in your taxonomy.
37
38 Save the changes and try. Next you could do whatever you want, like adding fields, theming, exposing filters, sorting or adding feeds.
39
40 <h3>Theme every vocabulary/term independently</h3>
41 Using <a href="http://drupal.org/project/tvi">TVI: Taxonomy Views Integrator</a> it's possible to theme every vocabulary or term with it's own view. All you have to do is clone the view in Step 1 and set it as the TVI active view in the vocab or term edit pages.