[support] Matching a term if it belongs to another term (views)
Vaibhav Jain
in.vaibhavjain at gmail.com
Tue Aug 2 08:48:31 UTC 2011
Luke,
If you are adding an argument in views and want to check if its the parent
if TID 3, you can do it this way.
Add the argument as term name or TID, then in the validator, you can write
php code to check that.
use function taxonomy_get_parents<http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.module/function/taxonomy_get_parents/6>to
get the parent of that TID.
Hope this helps.
On Tue, Aug 2, 2011 at 1:44 PM, Luke <drupal at lists.tacticus.com> wrote:
> Another views question:
>
> It would be convenient, if I could have a view match on a term argument,
> if the referenced TID was a child of another term.
>
> So if TIDs 80 through 200 were children of TID 3, rather than coding for
> the range (which might get out of range TIDs added to it later), is there
> some way I could have the view check whether the passed argument of TID
> 120, is in fact a child term of TID 3?
>
> Hopefully that's not stupidly basic.
>
> Luke
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
--
Regards,
Vaibhav Jain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110802/21ff6a94/attachment.html
More information about the support
mailing list