Closed Pixie74943 closed 8 years ago
Do you have a direct link o an example Pixie74943?
The site in question is currently under development and only accessible by the DECD and govCMS teams.
Here's an example of what @Pixie74943 is asking about, since I can see the example in question.
Hierarchical Select might be useful, and there's a Drupal module for Chosen.
The Chosen implementation replaces the <select>
with a <ul>
(from memory), you may be able to style that, although presumably that would be done via the JS, so it would be outside of the Drupal themeing process, but Chosen might allow you to specify a custom callback for building the lists.
You could also build an entity reference and use a view to gain control over the result set. Basically the setup:
You'll also need to build a view with an 'Entity Reference' display, this lets you customise the results so you could have something like "Parent > First child > Second child", as well as applying row classes (or attach images directly attached to a term etc)
For simple UI
"Chosen" module is in govCMS and there is an example field "tags" in default "blog_article" content type
For advanced UI
Give it a try with method by either @Feng-Shui or @srowlands
Hey @srowlands , I'm not sure what you mean.
Are you able to point me at some tutorials/documentation? The items are currently sorted by taxonomies, so I was trying to create an entity reference list based on that taxonomy. It doesn't seem to be an option though? I think I'm misunderstanding what your suggesting/where to start.
Closing out as this issue can be addressed with the Chosen module. Please open a new ticket if you still require an alternate solution.
Hi Team,
We are using a view with a drop down to select a taxonomy term. This has an exposed hierarchy, however the default to differentiate parent/child terms is not very pretty or effective.
It currently looks like this:
-Parent term --Child term 1 --Child term 2 ---Child of child -Parent term
Any of the govCMS team could view an example on the DECD website at /sites-and-facilities/governing-councils/resources-and-tools.
My searches have not turned up any way to restyle this using the existing modules, or css (the css labels do no mark up depth, just ID). There is a module that produces something similar to what we want which is Select with Style.
Specifically I'm looking at the second image, with the map icons. We don't need anything that fancy, just a way to select and style terms based on their hierachy.