Open krokkie opened 8 years ago
Conditional fields require the "type"s to be defined by the module, and not in a Taxonomy... See issue #14
The type stays taxonomy_term_reference, but the taxonomy terms now have a field which determines the sort behaviour: "lw_listing_order". Pseduo-code for the last two TODOs:
x = the lw_listing_order field of the taxonomy term referenced by the 'position' (a.k.a. type) field
switch x
case LIVING_WORD_LISTING_ORDER_SINGLE_SUB_VERSE
show subverse widget
case LIVING_WORD_LISTING_ORDER_APPLICATION_TAGS
show heading field
show tags field
case LIVING_WORD_LISTING_ORDER_PREDOMINANT_MULTI_VERSE
???
default
show nothing extra
@krokkie Please verify if this makes sense...
Lyk reg.
It does not only define the sort order, but also which fields are "required" in the editor, where it is presented in a list, etc.
Hmm... in that case, we need new names for the behaviours, and the field should be called lw_listing_behaviour and not lw_listing_order.
I propose that we name the possible values of lw_listing_behaviour
as follows:
LIVING_WORD_LISTING_BEHAVIOUR_BROAD
LIVING_WORD_LISTING_BEHAVIOUR_NARROW
LIVING_WORD_LISTING_BEHAVIOUR_TOPICAL
On the edit
page for taxonomy terms in the position
vocabulary, one can now select:
Since commit 1f28b6a44a2360f5578481102c84766a13eeb741, the heading
field only appears when application
(or any taxonomy term where the field lw_listing_behaviour == LIVING_WORD_LISTING_BEHAVIOUR_TOPICAL
) is selected.
Issue #16 blocks this.