Calendar Module, table specific

Archived from the Xataface Users forum.

auphi — Mon Jan 07, 2013 12:13 pm

When I include the calendar module in the conf.ini file it creates “calendar” tabs/dropdown views for all of my tables, but I really only want to be using it for one of them. Currently, I am *not* using the g2 plugin, although, I probably will be switching to it at some point in the future (if that makes a difference).

I briefly tried playing with actions/permissions, but that didn’t work (assuming it’s only for the built-in calendar). Is there an easy way only have it show up for the table I specify?


shannah — Mon Jan 07, 2013 12:35 pm

There are multiple ways to do this. They all require you to override the calendar_display action in your application’s actions.ini file:

Code: Select all
[calendar_display > calendar_display]     condition="$query['-table'] == 'mytable'"

This would cause it to only show up for the table mytable.

The other way would involve changing the permission for the action to a custom permission, then granting that permission only on specific tables.

-Steve


auphi — Mon Jan 07, 2013 4:53 pm

That’s perfect. “_display” was the missing key. Thanks!