Project

General

Profile

Paste
Download (10.8 KB) Statistics
| Branch: | Revision:

root / drupal7 / sites / all / modules / taxonomy_menu / README.txt @ 6d8023f2

1
TAXONOMY MENU
2
=============
3
(README.txt: 13th of April 2009, Version 6.x-2.3, indytechcook + ksc)
4

    
5
-------------- Content ------------------
6
INTRO
7
INSTALLATION
8
- New
9
- Upgrade
10
CONFIGURATION
11
- Where to find the configuration screen?
12
- Adjustments and options
13
PATH TYPES and INTEGRATION WITH VIEWS MODULE
14
- Menu Path Type: Default
15
- Menu Path Type: Hierarchy
16
- Menu Path Type: Custom
17
INTEGRATION WITH OTHER MODULES
18
- TAXONOMY MANGAGER
19
- TAXONOMY REDIRECT
20
- CONTENT TAXONOMY
21
- TAXONOMY BREADCRUMBS
22
- HIERARCHICAL SELECT
23
- i18n
24
- DOMAIN ACCESS
25
- PATHAUTO
26
ADDITIONAL NOTES
27
PROSPECT TO PLANNED FUNCTIONS
28
------------- End Content -----------------
29

    
30

    
31
INTRO
32
=====
33
This module adds links (menu entries) to taxonomy terms to the global navigation menu.
34
With the current version users can create one group of menu entries and add specific options 
35
for each vocabulary. More functionality is beeing planned with further versions. 
36

    
37
INSTALLATION
38
============
39

    
40
NEW 
41

    
42
1) Place this module directory in your "modules" folder (this will usually be
43
   "sites/all/modules/"). Don't install your module in Drupal core's "modules"
44
   folder, since that will cause problems and is bad practice in general. If
45
   "sites/all/modules" doesn't exist yet, just create it.
46

    
47
2) Enable the Taxonomy Menu module in Drupal at:
48
   administration -> site configuration -> modules (admin/build/modules)
49
   The Drupal core taxonomy module is required.
50
   The modules Taxonomy Menu Custom Path and Taxonomy Menu Hierarchy provide
51
   additional path configuration types (see the "INTEGRATION WITH VIEWS MODULE" section below). 
52

    
53
3) Create a new vocabulary or edit an excisting one.
54
   
55
4) Choose which vocabularies to appear in the menu at:
56
   administration -> content management -> taxonomy
57
   (admin/content/taxonomy)
58

    
59
UPGRADE
60
Please read UPGRADE.txt
61

    
62

    
63
CONFIGURATION
64
=============
65

    
66
LOCATION OF CONFIGURATION SCREEN
67
 All configuration options are on the vocabulary's edit screen: 
68
  admin/content/taxonomy   (or)
69
  admin/content/taxonomy/edit/vocabulary/$vid
70

    
71
ADJUSTMENTS AND OPTIONS
72
 Menu: Select under which menu the vocabulary's terms should appear. 
73
  With the current version users can create one group of menu entries for each vocabulary.
74
 
75
 Menu Path Type: Select how the url for the term path should be created. 
76
  Included are Default, Hierarchy and Custom Path.
77
  To use Hierarchy and/or Custom Path you need to enable the related modules first.  
78
  Menu Path Type = Default: The path will be taxonomy/term/% while Term ID will be passed as argument.
79
  (multiple arguments possible). This path type uses standard taxonomy display - views is not needed.
80
  
81
  For other path types and their options see: INTEGRATION WITH VIEWS MODULE
82
  For developers: This is extendable using hook_taxonomy_menu_path().
83
  See developers documentation for more information. (http://drupal.org/node/380652)
84
  
85
 Syncronise changes to this vocabulary: If selected, the menu will auto update when you
86
  change a node or term. Recommened to always have this selected.
87
  When you change the generated menu with the core menu function, i.e. move it or change the structure, 
88
  these changes most probably get lost when adding a new taxonomy term because Taxonomy Menu rebuilds
89
  the menu without knowing about the changes made elsewhere.
90
 
91
 Display Number of Nodes: Displays the number of nodes next to the term in the menu.
92
  If option "Display Descendants" is enabled also descendents will be counted.
93
 
94
 Hide Empty Terms: Does not create menu links for terms with no nodes attached to them.
95
 
96
 Item for Vocabulary: Create a menu link for the vocabulary.  
97
  This will be the parent menu item.
98
 
99
 Auto Expand Menu Item: Enables the 'Expand' option when creating the menu links.  
100
  This is useful if using 'suckerfish' menus (pull down menus) in the primary links.
101
 
102
 Display Descendants:  Alters the URL to display all of child terms. 
103
 <base path>/$tid $tid $tid $tid
104
  When this is set, the Path Alias (module PATHAUTO) is not applied.
105
 
106
 Select to rebuild the menu on submit: Deletes all of menu items and relationships between 
107
  the menu and terms and recreates them from the vocabulary's terms.  
108
  This will create new mlid's for each item, so be careful if using other modules to extend 
109
  the menu functionality.
110

    
111
     
112
PATH TYPES and INTEGRATION WITH VIEWS MODULE
113
============================================
114

    
115
MENU PATH TYPE: DEFAULT
116
 The path will be taxonomy/term/% while Term ID will be passed as argument (multiple arguments possible).
117
 This path type can be used without having the VIEWS module installed.
118
 VIEWS provides a view named taxonomy_term (A view to emulate Drupal core's handling of taxonomy/term)
119
 The path of the view is 'taxonomy/term/%', the argument is 'Term ID (with depth)' and 'Depth Modifier' - 
120
 but only TERM ID will be passed as an argument.
121
 One can adjust this view to ones needs - but it might be a problem, to have only one view for all all 
122
 taxonomy menu links. So it is recommended to use the option MENU PATH TYPE: CUSTOM for individual 
123
 views per vocabulary.    
124

    
125
MENU PATH TYPE: CUSTOM
126
 With this path type, one can create individual views for each vocabulary.
127
 You need to have a view (page) with path 'custom path/%' and an argument 'Term ID' BEFORE you create 
128
 the taxonomy menu. Enable the option "Allow multiple terms per argument" while adding the argument 
129
 'Term ID' and choose a title like "Terms". Other options should be left by default unless really 
130
 needs to change sth..
131
 Fields and filters can be added and options can be set according to ones needs.
132
 Back to Taxonomy Menu:
133
 Enter your 'custom path' in the field "Base Path for Custom Path:" - leave out '/%'. 
134
 For example when your view path is 'interests/%' you enter only 'interests' here.   
135
 To use the 'Display Depth in Custom Path:' option, you need to have 'Taxonomy: Term ID depth modifier' 
136
 as second argument within your view.  
137

    
138
MENU PATH TYPE: HIERARCHY
139
 This path type is mainly beeing created for developers use.
140
 This should only be applied if you have custom code or a block that relies on the category/vid/tid/tid/tid.
141
 If you would like the url to be this path, the recomendation is to use PathAuto with 
142
 'category/[vocab-raw]/[copath-raw]'. Use the field "Base Path for Hierarchy Path" to see the base URL 
143
 that will match the veiw or page callback. The view or pagecall back MUST be created before the taxonomy menu.
144
 
145
 --- How to set up a view for MENU PATH TYPE: HIERARCHY (and only for this!)-----
146
 
147
 The vocabulary might be like:
148
 Vocabulary
149
 Term-1
150
 -- Term-1.1
151
 -- --Term-1.1.1
152
 -- --Term-1.1.2
153
 -- Term-1.2
154
 Term-2
155
 -- Term-2.1
156

    
157
 What is needed:
158
 Modules: TAXONOMY MENU with TAXONOMY MENU HIERARCHY and VIEWS
159

    
160
 Steps:
161
 * Create a view with a path: category/% (where the term "category" can be chosen)
162
 * Add fields and filters according your needs
163
 * Add the following arguments:
164
   - Vocabulary ID (Title: %1)
165
   - Term ID (Title: %2)
166
   - Term ID (Title: %3)
167
   - Term ID (Title: %4)
168
   - More arguments of this types might be needed, if the vocabulary has a greater depth than 3. 
169

    
170
 * Go to admin/content/taxonomy
171
   - Select the vocabulary you want to have a menu for.
172
   - Select "Menu:" (where the menu should show up)
173
   - Select "Menu Path Type: Hierarchy"
174
   - Enter "Base Path for Hierarchy Path: category" (or what you have chosen as path for view)
175
   - Optional: Display Number of Nodes / Auto Expand Menu Item
176
   - Check "Item for vocabulary"
177
   - Do NOT check "display descendants"  
178

    
179
 After saving the menu should appear.
180
 Now comes the BUT: most probably you donĀ“t see any nodes when klicking the menu items.
181
 For Term-1 the path is: ..category/vid/tid, for Term-1.1.1 it is category/vid/tid/tid/tid
182
 Everything behind "category" will be taken as arguments in views.
183
 So only those nodes will be shown that are linked to the taxonomy terms Term-1 AND Term-1.1 
184
 AND Term1.1.1. within the vocabulary (it is a logical AND function, whereas multiple arguments 
185
 TermID TermID TermID is a logical OR function).
186
 Once you have linked your nodes to the taxonomy terms in the described way, they will be shown 
187
 when clicking on the menu items. It produces nice breadcrumbs and page titles (remember to set 
188
 the titles for the arguments in views as described) - and it always displays descendants.
189
 The only module that supports the saving of a whole term lineage when selecting a deep level 
190
 item seems to be HIERARCHICAL SELECT. See chapter INTEGRATION WITH OTHER MODULES
191
 
192
INTEGRATION WITH OTHER MODULES
193
==============================
194

    
195
TAXONOMY MANGAGER
196
Helpful to organize taxonomy terms - Taxonomy Menu module does not interfere with it functions.
197
(http://drupal.org/project/taxonomy_manager)
198

    
199
TAXONOMY REDIRECT
200
Changes the taxonomy default URL to match the custom Taxonomy Menu Path can be controlled 
201
by Taxonomy Redirect. 
202
(http://drupal.org/project/taxonomy_redirect)
203
 
204
CONTENT TAXONOMY
205
It is a nice and very helpful module to link taxonomy terms to nodes. 
206
Taxonomy Menu does not interface with the content taxonomy tables, so be sure to enable the option 
207
"Save values additionally to the core taxonomy system (into the 'term_node' table)" 
208
otherwise the related taxonomy terms will not be accessible for Taxonomy Menu.
209
(http://drupal.org/project/content_taxonomy)
210
 
211
HIERARCHICAL SELECT with submodule HS_TAXONOMY
212
Supports the selection of terms in an hierarchical structured vocabulary. 
213
For using "MENU PATH TYPE: HIERARCHY" within Taxonomy Menu the HS options "Save term lineage" 
214
and "Force the user to choose a term from a deepest level" should be enabled.
215
(http://drupal.org/project/hierarchical_select) 
216
 
217
TAXONOMY BREADCRUMBS
218
Advanced breadcrumbs can be controlled by this module.
219
(http://drupal.org/project/taxonomy_breadcrumbs)
220

    
221
MENU BREADCRUMBS
222
Helpful to create menu breadcrumps outside the main navigation menu especially 
223
when using Custom or Hierarchical path. 
224
(http://drupal.org/project/menu_breadcrumbs)
225

    
226
i18n
227
At the momement the multiple language support seems to work only when the Taxonomy Menu option 
228
"item for vocabulary" is disabled. 
229

    
230
DOMAIN ACCESS
231
....
232

    
233
PATHAUTO
234
 Menu Items are Path Alias aware and compatible with PATHAUTO.
235
 Have a look at the various path types, which URL is passed to the code.
236
 Delault is taxonomy/term/$tid.
237
 (http://drupal.org/project/pathauto)
238
 
239
 
240
ADDITIONAL NOTES
241
================
242
 * Taxonomy Menu does not handle the menu call backs. It only creates the links to the menus.
243
   This means that everythign that is displayed on the page (including title, content, breadcrumbs, etc)
244
   are not controlled by Taxonony Menu.
245
 * The router item must be created before Taxonomy Menu creates the links.  Failure to so so 
246
   will cause the menu items to not be created.
247
 * Router items can be created by either a view or another modules hook_menu.
248

    
249
 
250
PROSPECT TO PLANNED FUNCTIONS (6.x-3.0 version)
251
===============================================
252
- concept of "Menu Groups"
253
- any number of Menu Groups per vocabulary
254
- more than one vocabulary within one Menu Group
255
- more options to define the url path
256
- other options