¿How to identify depth of terms from a panel of node?
The Idea is building a Views based on Node Terms to identify Term depth, and display in this panels node others nodes in this term.

Example:
I have this taxonomy structure:
-State
--City
---Neighborhood

The ieda is display in my panels (node based) others properties in same Neighborhood.

This is Urgent for many people!

Comments

merlinofchaos’s picture

Status: Active » Fixed

There are a couple of days to do this.

1) You can use the "Taxonomy: parent term" access rule to see if the term has a parent. However, this really only gets you 'top level' or 'not top level'.

If you need to check actual depth, you need to create a chain of relationships.

You can use the 'Term parent' relationship in a chain to 'walk' up the parent tree. For example, in your given scenario you've got 3 levels of hierarchy in your taxonomy, so you need two relationships, chained off of each other. The first relationship gets the parent term of the term, and the second relationship gets the grandparent term.

You can then test depth by using the 'context exists' access rule/selection criteria.

If the grandparent context exists, then the term is at least 2 deep. If the grandparent exists and the grandparent has no parent, then you know that it is exactly 2 deep.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

summit’s picture

Category: feature » support
Status: Closed (fixed) » Active

Hi Earl,
Sorry to open this again, but I am not getting the things working.

I want a panel-pane with a block view to NOT be visible on depth 2 (or 3 if you start by 1) (depth 0 = country, depth 1 = region, depth 2 = city). I do not want to show the block on city level. So I want on city level I think something like the grandparent doesn't have a parent.

VIEWS
What I did is the following. I assume the first sentences where about views, right?
1) So I created two 'Term parent' relationships in my view.

Taxonomie: Parent term 
(grandparent) Taxonomie: Parent term 

PANELS
Then I created the visibility rule:
- Context exists Depth exists.

But now I do not see my panel-pane views-block nowhere? If I set the rule to Depth not-exists I see the panel-pane on every level again?
What do I do wrong please? Do You also need to set the context in the panel-pane settings?

thanks a lot for your support!
greetings,
Martijn

dvasquez’s picture

this guy http://drupal.org/node/795998#comment-3538126 needs help... help to him!

Thanks!

summit’s picture

Hi Donny,
Thanks for the support!
Did you solve your issue. I think the only difference is, that I would like to use a panel-pane and tried visibility rules, but may be I need to build a panel-variant, and use that particular pane in the new variant with selection rules..?

I find it hard to grasp the selection rules and visibiltiy rules working with panels. I don't see any in depth documentation also..so any help is needed!

Thanks a lot in advance for your response.
Greetings, Martijn

summit’s picture

Category: support » bug

Hi I tried all possible ways with above, but am only getting the situation that I see the panel-pane nowhere or everywhere (on every termdepth).

I think now this is a bug, or I am doing something wrong. Sorry but can't find more info on Panels visibilty rules to get this working, and did everything else as described.
Thanks for going into this.

greetings, Martijn

dvasquez’s picture

Hello man, no, i've not fixed this issue... we've made all possible, but, without answer...

summit’s picture

Version: 6.x-3.3 » 6.x-3.x-dev

Hi,
Still not having a nice solution for the following:
Term with path region/america ==> Panel 1 needs to show.
Term with path region/america/new york ==> Panel 2 needs to show.

The path is a term alias which is build through depths of terms. So I preferrably would like a panel-thingie which has term-depth in focus.

Anyone have a solution please?
Thanks a lot in advance for your reply!

Greetings, Martijn

zship’s picture

I submitted a module dealing with this here: http://drupal.org/node/231911#comment-4555864 . God help us all.

Letharion’s picture

Status: Active » Fixed

It won't require a great deal of work or code to create a custom access plugin that does exactly this, which to me seems like the proper solution. If well enough done it could perhaps be included in Ctools. Check the ctools examples in the "ctools/ctools_plugin_example/plugins" directory.

Letharion’s picture

Category: bug » support

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.