I dont want to use PHP visibility rule to add a custom condition but I want to hide a pane based on some condition. How can I do that?

  • 2
    You need an "access plugin". See drupal.stackexchange.com/questions/33336/… for an example. – Letharion Nov 5 '14 at 7:46
  • Also, +1 on avoiding PHP visibility rules. :) – Letharion Nov 5 '14 at 7:46
  • @Letharion why comment instead of answer? – Mołot Nov 5 '14 at 7:47
  • 1
    Yes, exactly, the top example is not relevant for what you want, both the access one is. :) – Letharion Nov 5 '14 at 8:56
  • 1
    "but the access one is", of course. No worries, glad to help. Especially when it means someone is not using the php module ;) Posted an answer below, which is essentially my comment. – Letharion Nov 5 '14 at 9:07

What you're looking for is called a access plugin, those are how Page manager (and by extension Panels) control both access and visibility settings.

This question: What are Ctools plugin (content type, access, etc), and how does one create them? has a lot more details and implementation examples.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.