Closed (won't fix)
Project:
Taxonomy Term Children
Version:
6.x-1.2
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Jan 2012 at 05:25 UTC
Updated:
11 Jan 2012 at 09:18 UTC
Hi,
I am using the below stated code to display the terms associated with the page.Is there any way to show it in ascendng and descending order alphabetically.
/**
* Prints an unordered list of the terms (as links) that are
* associated to the currently displayed node.
if ( arg(0) == 'node' && is_numeric(arg(1)) ) {
$node = node_load(arg(1));
$vid = 2;
$terms = taxonomy_node_get_terms_by_vocabulary($node, $vid);
if ($terms) {
print '<ul>';
foreach ($terms as $term) {
print '<li>'.l($term->name, 'taxonomy/term/'.$term->tid).'</li>';
}
print '</ul>';
}
}
**/
Current Result:
Mango
Apple
Orange
Bananna
Required Result:
Apple
Bannana
Mango
Orange
Comments
Comment #1
marcoka commentedthis module, as you can read on the module page is OBSOLETE and not developed anymore.