refstudycentre/living_word

Change "type" field's field type from "taxonomy_term_reference" to "list_text"

Closed this issue · 2 comments

Because the ordering of results depends heavily on the "type" field in Living Word, the possible values for "type" need to be defined in the living_word module. Since we do not need any of the rich functionality of the taxonomy module for the options in "type", taxonomy should not be used. list_text would be better. Example of a similar field:

  $fieldname = "{$prefix}_workflow";
  if (!in_array($fieldname, $fieldnames)) {
    field_create_field(array(
      'field_name'  => $fieldname,
      'type'        => 'list_text',
      'cardinality' => FIELD_CARDINALITY_UNLIMITED,
      'settings'    => array(
        'allowed_values' => array(
          'proofread' => '01. Proofread (i.e. checked for linguistic errors)',
          'moderated' => '02. Moderated (i.e. content has been checked and level of detail has been set)',
          'reviewed'  => '03. Reviewed (i.e. content is ordered and ready for publication)',
        ),
      ),
    ));
  }

This blocks Issue #11

We can do as you suggested.

But I have a slightly different suggestion: What if we add a field to the taxonomy, that defines the behavior ? And we leave the behaviour fixed to a limited set of values?

Currently we have: https://github.com/refstudycentre/living_word/blob/master/living_word/living_word.taxonomy.inc
where it adds some values.
$terms = array("Introduction", "Structure", "Timeline and Charts", "Technical", "Exposition", "Application");
We have three different behaviors:

  • The behavior for Into+struct+timeline is the same
  • Technical+Exposition is the same
  • Application

Jopie explicitly mentioned that this list is not final yet. So when we want to add another category that fits into one of the existing behaviors, it will be pretty easy to add ?

We have to "map" the chosen-category to the behavior any way...
So let's name the behaviors as:

  1. OrderPredominantMultiverse
  2. OrderSingleAndSubverse
  3. OrderApplicationTags ?

Your suggestion is better. I'll start on that!