Ran into a slight inconvenience. Looked through the token code in core and it's a little beyond my abilities so thought I'd put in a request. I would like to replace a token with it's parent. D7 would look something like this:
[node:TERM_REVERENCE_FIELD:parent]
This works fine in Backdrop:
token_replace('[node:field_category]', array('node' => $node))
However, this does not work (it works in D7):
token_replace('[node:field_category:parent]', array('node' => $node))
PS: As a "work-around" (to get the parent), I'm using a couple Taxonomy functions:
taxonomy_term_load($tid)
taxonomy_get_parents($tid)
Recent comments
Thanks for the guide, let me do just that. I hope there is still a chance of these seeing a backdrop port.
Station and Community Media
The block system and API in Backdrop is very different from Drupal's. In Backdrop, as in Drupal, modules can define blocks in code (in fact some of the API at this level is the same, with...
Drupal block module conversion
This was from examining line 2463- of the webform.module, where // Attach necessary JavaScript and CSS. $form['#attached'] = array( 'css' => array(backdrop_get_path('module', 'webform...
How do I diagnose Webform Conditionals failing?
d'oh. Because of course it is reassigning. Don't mind me... the correct syntax is $form['#attached']['js'][] = backdrop_get_path('module', 'mymodule') . '/mymodule.js';
How do I diagnose Webform Conditionals failing?
Issue opened at Github: https://github.com/backdrop-contrib/webform/issues/220
How do I diagnose Webform Conditionals failing?