DrupalBin
Submit Code
About
Recent Posts
Code
1 hour 50 min
ago
Fix for my user handler
2 hours 12 min
ago
Fix for my user handler
2 hours 16 min
ago
my user handler
4 hours 5 min
ago
more
Tags
CCK
fapi
javascript
jquery
menu
module
Panels
simpletest
template.php
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
June 27, 2008 - 11:40am — Anonymous
// 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
;
arguments
taxonomy
views