DrupalBin
Submit Code
About
Recent Posts
admin settings not saving
7 min 31 sec
ago
Code
50 min 38 sec
ago
Code
1 hour 6 min
ago
css path
2 hours 50 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Fix for Argument handling code for a view taking in TID as argument, trying to get the parent TID to be returned (if it has)
View
Download
Fix
This fix will not be saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Source code:
*
// note that this only gets the immediate parent if ($args[0]){ $parents = taxonomy_get_parents($args[0]); if ($parents) { foreach ($parents as $parent) { $parentID = $parent->tid; $args[0] = $parentID; } } } return $args;
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal
Drupal 5
Drupal 6
HTML
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.