nodeapi

Events happening in the community are now at Drupal community events on www.drupal.org.
cuxi's picture

Lấy tid trong hook nodeapi when $op === 'presave'

Chào các bạn.
Mình đang có vấn đề là when mình dùng hook_nodeapi với $op === 'presave' mình có thể lấy được tid của term không?

if ($op === 'presave') { 
foreach ($node->taxonomy as $term) {
      if ($term->vid == 7) {
            $tid = $term->tid;
        break;
        }
        }  
/**
* process tid here
*/
}

dường như nó không hoạt động Read more
Subscribe with RSS Syndicate content