Calendar Module, table specific

A place for users and developers of the Xataface to discuss and receive support.

Calendar Module, table specific

Postby 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?
auphi
 
Posts: 20
Joined: Sun Oct 21, 2012 7:39 pm

Re: Calendar Module, table specific

Postby 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
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Calendar Module, table specific

Postby auphi » Mon Jan 07, 2013 4:53 pm

That's perfect. "_display" was the missing key. Thanks!
auphi
 
Posts: 20
Joined: Sun Oct 21, 2012 7:39 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 19 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved