hook_term_path

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

developer/hooks/core.php, строка 2274

Версии
6
hook_term_path($term)

Позволяет модулям предоставлять альтернативные пути к терминам таксономии, которыми заведует модуль.

For vocabularies not maintained by taxonomy.module, give the maintaining module a chance to provide a path for terms in that vocabulary.

'Not maintained by taxonomy.module' is misleading. It means that the vocabulary table contains a module name in the 'module' column. Any module may update this column and will then be called to provide an alternative path for the terms it recognizes (manages).

This hook should be used rather than hard-coding a 'taxonomy/term/xxx' path.

See also

taxonomy_term_path()

Параметры

$term A term object.

Возвращаемое значение

An internal Drupal path.

Связанные темы

Код

<?php
function hook_term_path($term) {
  return 'taxonomy/term/'. $term->tid;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему