Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Don't download this module, it's stupid. It provides a ajaxy toggle link for any boolean-like value on your site. So in a practical sense, it can be used to Publish/Unpublish nodes, Activate/Block users, Sticky/Unsticky nodes.. You get the idea...

There is Views integration so you can just drop this link in as a field.

"This seems pretty handy, but why is it stupid?"

It's stupid in the sense that it doesn't necessarily notify Drupal that a particular value has been updated, such as you'd expect from something like hook_node_update(). If you can deal with that, then this module is golden.

"How do I implement this in code?

$build['node_sticky_toggle_link'] = array(
  '#type' => 'flip',
  '#flip_type' => 'node_sticky',
  '#id_value' => 2, // Usually this will be dynamic, and directly corresponds with the id_key
);

"That's cool, but I want this to work with my own custom data. What now?"

@see hook_flip_info()
@see hook_flip_info_alter()
// .. in flip.api.php

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • Created by helior on , updated