DrupalBin
Submit Code
About
Recent Posts
Failed relationship
7 hours 5 min
ago
Fix for Code
8 hours 19 min
ago
Fix for Code
8 hours 23 min
ago
Fix for Code
8 hours 42 min
ago
more
Tags
CCK
fapi
jquery
menu
module
Panels
php
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
arguments
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)
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
;
arguments
taxonomy
views
Read more
Argument handling code for a view taking in TID as argument, trying to get the parent TID to be returned (if it has)
June 27, 2008 - 10:14am — Anonymous
if
(
taxonomy_get_parents
(
$args
[
0
]
)
)
{
$args
[
0
]
=
taxonomy_get_parents
(
$args
[
0
]
)
;
}
return
$args
;
arguments
taxonomy
views