public function FacetApiPrettyPathsCoderTaxonomy::encodePathSegment in Facet API Pretty Paths 6.3
Same name and namespace in other branches
- 7 plugins/coders/facetapi_pretty_paths_coder_taxonomy.inc \FacetApiPrettyPathsCoderTaxonomy::encodePathSegment()
Taxonomy special case: <alias>/<term-name>-<term-id>
Overrides FacetApiPrettyPathsCoderDefault::encodePathSegment
See also
FacetApiPrettyPathsCoderDefault::encodePathSegment()
File
- plugins/
coders/ facetapi_pretty_paths_coder_taxonomy.inc, line 18 - A taxonomy specific coder for pretty paths.
Class
- FacetApiPrettyPathsCoderTaxonomy
- Taxonomy specific implementation of FacetApiPrettyPathsCoder.
Code
public function encodePathSegment(array $args) {
if ($term = taxonomy_term_load($args['segment']['value'])) {
$args['segment']['value'] = $this
->prettyPath($term->name) . '-' . $term->tid;
}
return parent::encodePathSegment($args);
}