Hi, I am struggling with this already a year..
I am not a programmer, but am looking for a solution to get the possibility to have a different variant of a panel related to the hierarcy of a regional vocabulary.
I know it is possible now to distinct a variant because of a different vocabulary.
Could someone please make a possibility to have also term depth as variant choose next to this.

So variant is 1a) a specific vocabulary and 1b) within this vocabulary the depth of the term.

This way nice differtent variants can be build to support location/regional based websites!

Thanks a lot in advance for your reply!
Greetings, Martijn

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Summit’s picture

Hi, This thread is related but I am looking for a panels/ctools solution, because of upgrade possibilities to D7 also: http://drupal.org/node/231911#comment-4555864
greetings, Martijn

Letharion’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Active » Postponed

I think it's a worthwhile feature request, and I've considered setting aside the time myself to attempt this, but unfortunately, as with most volunteer work, time is very limited.

I'm moving this to the postponed queue for now. Also moving it to D7, as it would need to be implemented there first.

Summit’s picture

Hi Claes,
Thanks for trying in advance, hopefully it work out. This will be a great advantage to move forward for supporting hierarchical and regional websites with panels (with country,region, place etc..).
Greetings, Martijn

Summit’s picture

Hi,
Is there any progress in this field please? Would love to see a term depth solution with panels!
greetings, Martijn

Letharion’s picture

Status: Postponed » Needs review
FileSize
1.5 KB

So, I'm getting a bit annoyed at myself for not getting anywhere with this. I quickly threw something together here, please review and we'll see what we can do with it. It's in it's own module now, but should probably become a Ctools patch.

Summit’s picture

Hi, Will look into this tomorrow, now not at home. Thanks for your effort already! Greetings, Martijn

Summit’s picture

FileSize
51.35 KB

Hi Claes,

Finally had time to test your module thoroughly. I see the "term depth" Selection Rules in panels. Which is great!

But somehow it doesn't work. When I type a 1, 2 or other number in the attached screen it shows no number anymore when I click Edit.
Next to this the description says ""Term being viewed" has parent in vocabulary "regionaal", which I think is the incorrect description.

Hopefully when the variable is saved so when clicking edit I still see the value, the functionality also works.
In attached screen the situation. I override the taxonomy with panels. I would expect when I have one variant for all terms and I insert 1 then for testers sake, the only terms which would show using that changed panel should be the terms on level 1 depth? right?
For instance In one vocabulary (regionaal= regional) I have Continent = 0, country = 1, region = 2, city = 3. Then inserting 1 as term depth for Selection rule would only show this panel if the clicked term is country-level, like Germany, France etc.. right?

Thanks again for building this, and hopefully it works soon!

Greetings, Martijn

Letharion’s picture

Assigned: Unassigned » Letharion
Status: Needs review » Needs work
ptmkenny’s picture

Thanks for adding this! I was able to get it working by simply installing and enabling the module.

However, as reported in #7, "When I type a 1, 2 or other number in the attached screen it shows no number anymore when I click Edit." However, even though the number isn't shown when edit is clicked, it does appear to be saved properly, because my panels now function as intended once I set the depth.

Also, this is just a minor cosmetic issue, but when I clicked to add term depth, I saw a green "warning" box with the message "plugins/access".

ptmkenny’s picture

I found the reason for the warning about plugins--> There is a dpm() statement on line 5 of term_depth.module.

Summit’s picture

Hi,
Please integrate http://drupal.org/node/1446626#comment-5988388 within ctools.
It would be great to finally have a depth-way of building variants!

greetings, Martijn

Letharion’s picture

Status: Needs work » Needs review
FileSize
1.6 KB

Bah. New attempt.

Letharion’s picture

Status: Needs review » Active

Well, no actual patch in here.

KeyboardCowboy’s picture

Status: Active » Reviewed & tested by the community

This worked for me. Maybe update the text to say

"Term being viewed" has parent depth in vocabulary "XXX" at Y

But otherwise looks good. Thanks for posting this.

vasrush’s picture

Works perfect for me.
It's a very-very useful feature
Thanks for posting

Summit’s picture

Hi, would love to see #12 also working on D6, is this possible please?
Thanks a lot in advance for considering this!
Greetings, Martijn

japerry’s picture

Project: Panels » Chaos Tool Suite (ctools)
Version: 7.x-3.x-dev » 7.x-1.x-dev
Issue summary: View changes

Committed to the ctools sandbox.

Renaming to the ctools queue, since its code for ctools.

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Rerolled into a patch, tested, fixed, and committed:

http://drupalcode.org/project/ctools.git/commit/e305ca826fd5652d6b71f91f...

Status: Fixed » Closed (fixed)

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