1 |
85ad3d82
|
Assos Assos
|
|
2 |
|
|
-- SUMMARY --
|
3 |
|
|
|
4 |
|
|
The Simple hierarchical select module displays selected taxonomy fields as
|
5 |
|
|
hierarchical selects on node creation/edit forms and as exposed filter in views.
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
-- REQUIREMENTS --
|
9 |
|
|
|
10 |
|
|
Taxonomy module (Drupal core) needs to be enabled.
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
-- INSTALLATION --
|
14 |
|
|
|
15 |
|
|
* Install as usual, see http://drupal.org/documentation/install/modules-themes/modules-7
|
16 |
|
|
for further information.
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
-- CONFIGURATION --
|
20 |
|
|
|
21 |
|
|
* Create a new field (type "Term reference") and select
|
22 |
|
|
"Simple hierarchical select" as widget type.
|
23 |
|
|
|
24 |
|
|
* Field settings
|
25 |
|
|
- "Display number of nodes"
|
26 |
|
|
Displays the number of nodes associated to a term next to the term name in
|
27 |
|
|
the dropdown.
|
28 |
|
|
WARNING: on sites with a lot of terms and nodes this can be a great
|
29 |
|
|
performance killer (even if the data is cached).
|
30 |
|
|
- "Allow creating new terms"
|
31 |
|
|
Terms may be created directly from within the dropdowns (user needs to have
|
32 |
|
|
permission to create terms in the vocabulary).
|
33 |
|
|
- "Allow creating new levels"
|
34 |
|
|
If selected users with permission to create terms in the vocabulary will be
|
35 |
|
|
able to create a new term as child of the currently selected term.
|
36 |
|
|
- "Force selection of deepest level"
|
37 |
|
|
Force users to select terms from the deepest level.
|
38 |
|
|
|
39 |
|
|
* Views (exposed filter)
|
40 |
|
|
- add a new filter using the field set-up as "Simple hierarchical select" or
|
41 |
|
|
use "Content: Has taxonomy terms (with depth; Simple hierarchical select)"
|
42 |
|
|
as a new filter
|
43 |
|
|
- use "Simple hierarchical select" as selection type
|
44 |
|
|
- select "Expose this filter to visitors, to allow them to change it"
|
45 |
|
|
- enjoy :)
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
-- INTEGRATION WITH OTHER MODULES --
|
49 |
|
|
|
50 |
|
|
* Chosen (http://drupal.org/project/chosen)
|
51 |
|
|
- If you have installed the module "Chosen" (>= 7.x-2.x) all elements of
|
52 |
|
|
"Simple hierarchical select" are modified, so the user can search for items
|
53 |
|
|
within the list. See http://drupal.org/project/chosen for more information.
|
54 |
|
|
- If you have configured "Chosen" to apply always but do not want to apply it
|
55 |
|
|
to the dropdowns created by "Simple hierarchical select" you may use the
|
56 |
|
|
following CSS selector in the "Chosen" configuration:
|
57 |
|
|
<code>select:visible:not(.shs-select)</code>
|
58 |
|
|
- Apart from that you can select whether to use chosen on a per-field base by
|
59 |
|
|
setting the option "Output this field with Chosen" in the field
|
60 |
|
|
configuration.
|
61 |
|
|
- "let chosen decide"
|
62 |
|
|
The field is modified by Chosen if it matches the Chosen configuration.
|
63 |
|
|
- "always"
|
64 |
|
|
The field is always modified by Chosen.
|
65 |
|
|
- "never"
|
66 |
|
|
The field is not modified by Chosen even if it matches the Chosen
|
67 |
|
|
configuration.
|
68 |
|
|
|
69 |
|
|
* High-performance JavaScript callback handler (http://drupal.org/project/js)
|
70 |
|
|
- If you have lots of terms and a huge hierarchy you could increase the
|
71 |
|
|
performance of "Simple hierarchical select" by installing "JS". It routes
|
72 |
|
|
all javascript callbacks needed by "Simple hierarchical select" through a
|
73 |
|
|
custom handler to avoid loading of all Drupal functions and speed up
|
74 |
|
|
loading.
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
-- CONTACT --
|
78 |
|
|
|
79 |
|
|
Current maintainers:
|
80 |
|
|
* Stefan Borchert (stborchert) - http://drupal.org/user/36942
|
81 |
|
|
|
82 |
|
|
This project has been sponsored by:
|
83 |
|
|
* undpaul
|
84 |
|
|
Drupal experts providing professional Drupal development services.
|
85 |
|
|
Visit http://www.undpaul.de for more information.
|