Field Formatter Conditions: Flag

This project is not covered by Drupal’s security advisory policy.

Adds an additional condition, to be used by [ffc.module](Field Formatter Conditions) so that we can show or hide rendered fields depending on of an entity is flagged in some ways.

A glue module between ffc and flag.

Requirements

Usage

With this module enabled you can:

  • Configure the Flag for your content type(s)
  • Flag content as needed
  • Configure the Field Formatter Settings with Field UI to:
  • Set certain fields to show or hide, based on the flag status for the entity being rendered.

Use case

We had a large amount of content (scientific research) - some of which was judged to be non-current, or deprecated. However, for integrity, this information could not be offlined or unpublished - it is still true and could be referenced - we just need to flag it as old.

The solution to the main question was to introduce a "Flag" to mark content as "Archived" or deprecated. (Alternative approaches with taxonomy tagging or workflow were explored, but failed. Flag module won for a number of reasons, mostly because of the advanced UI that flag module brings ).

So, after a good amount of adjustment that allows content items to be marked as "Archived" (But still available) by content managers - we needed to surface this information to consumers. At the user end, we place a disclaimer banner over the top of content that is marked old and unmaintained (flag + context + block).

But further to this, we needed to gently indicate 'old' content in search results and views lists. The most expedient way decided on for this (rather than add an obtrusive "deprecated" flag on stuff that was merely "older") was to make the date of the content more prominent when shown in lists.
Date is a normal field UI field, and we just needed to choose whether it was worth showing prominently in some contexts.

Solution

To this end: We wanted to:
Show the date on teasers for "archived" content ... while leaving it out of the design for current content.

Field Formatter Conditions (which we already used) seemed to be the tool for this. But needed 'Flag' module integration.
This module fills that gap.
ffc_flag UI
ffc_flag results

Supporting organizations: 
Sponsorship through client work

Project information

Releases