Drupal 6 Redirection automatically when selecting the deepest item from a hierarchical tree

Drupal 6, Redirection automatically when selecting the deepest element from a hierarchical tree, for example:

Parent of trees
 . | _Child 1
 .... | __Child 1.1
 . | _Child 2

Redirection actions should occur only on the last elements: Child 1.1 and Child 2 Assignment of types of different types of content will be determined in the js array. But how to send a hierarchical selection value to, destination type add content type? Maybe like redirect_url? Tid_value = value123. I have to save all the ways of taxonomy, but it will be enouth to get the deepest value. Should I use a multi-page approach here?

+3
source share
1 answer

Answering my question:

create a new module, for example 'enter_content'.

In this module, I load a javascript file that binds ... bind ('change-hierarchical-select', ... with a custom js function to all elements of a hierarchical field selection.

When happens When an event changes, js checks the element class ... hasClass ('has-no-children').

Therefore, when there are no children, I do a redirect to my desired form, such as content content.

0
source

Source: https://habr.com/ru/post/1756001/


All Articles