Download & Extend

Add option to disable availability per node

Project:Availability Calendars
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:nicholas.alipaz
Status:closed (won't fix)

Issue Summary

It may be that the nodes that need availability calendars also share the same content type with other nodes on the site, but we wouldn't want to show availability calendars for all of those nodes. It should be possible to disable availability calendars on a per node basis.

Comments

#1

i agree. In my usage, I wanted to include a form for the user to fill out so I enabled the availability calendar in my webform content-type setup...now ALL webforms I want to create have to have the availability calendar on it.

See example at:
http://sb.dowsett.ca/availability

#2

Version:5.x-1.x-dev» 6.x-1.2

I will be reviewing this request in the 6.x version. I am sorry I won't be porting back to 5.

#3

Assigned to:Anonymous» nicholas.alipaz

#4

Version:6.x-1.2» 6.x-2.x-dev

if this gets added it will be in 2.x branch

#5

My first reaction is to say that your content types were not defined correctly. The use case as presented in comment #1 is an example of this. Webform allows to attach itself to multiple content types as well (at least in D6 and D7). So no need to hide calendars here.

On second thought, I can see some use cases for this: e.g. a rental site that lets house owners decide whether they want to show (and thus have to maintain) the calendar or not.

Still, there are other ways to prevent the calendar from being output. All output is generated via theme functions, so you can override the hook_theme entry (in your own module or theme) and add a condition to it. There is also the option of not automatically outputting the calendar and leaving it up to you to get it rendered. In D7 it is even easier, as the theme function returns a render array that is being added to the node object. Subsequently, this element can be hidden using the hide() function.

If we decide to use field api in D7, this will become a non-issue for that version, because fields can be left empty by default.

Concluding, I would say a 'won't fix'. Anyone some other thoughts on this?

#6

Status:active» closed (won't fix)

Agreed, in D6 please make use of theme overrides to perform this operation. D7 we will see in future. If you have issues doing the described operations then please open a new support request.