开发者

Drupal 6 Redirect automatically when selecting deepest item from a hierarchycal tree

开发者 https://www.devze.com 2023-01-08 04:52 出处:网络
Drupal 6, Redirect automatically when selecting deepest item from a hierarchycal tree, like: Tree Parent

Drupal 6, Redirect automatically when selecting deepest item from a hierarchycal tree, like:

Tree Parent

.|_Child 1

....|__Child 1.1

.|_Child 2

Redirect action must occour only on the last items: Child 1.1 and Child 2 Destination of creat different content types, will be defined in js array. But how to send hierarchical select value to, destination add content type? Maybe like r开发者_如何学Cedirect_url?tid_value=value123. I have to save all taxonomy path, but it would be enouth to get deepest one tid value. Should i use multipage approuch here?


Answering to my question:

create new module, like 'enter_content'.

In this module i am loading javascript file, which binds ...bind('change-hierarchical-select', ... with custom js function, to all hierarchical select field elements.

When happens On change event, js checks for element class ...hasClass('has-no-children').

So when there is no childrens i am doing redirect to my desired create content type form.

0

精彩评论

暂无评论...
验证码 换一张
取 消