Say you have 500 wiki pages. And you want structured meta-data about these pages. Categories and tags are nice, but what if I want a drop-down or multi-select check box? It would be really nice to have tracker fields!
For a glossary, you could want definition, synonyms, Part of speech, etc.
While we are at it, we should have this extensibility for all data types (blog, articles, etc.)
Potential approaches
Improve tags and categories
Perhaps a module to pick categories with restrictions?
Ex.: a drop down of all choices of parent category X
You can use Module change_category and filter with the parent category of your list.
An example below:
{module module="change_category" decoration="0" notitle="y" id="165"}
And let's test two pickers on the same page...
Maybe we should add PluginChangeCategory so it's easier/nicer?
{categorypicker parents=62,56,87,33 type=62/d,56/c,87/c,33/c} d= drop down c= check boxes
Associate trackers to items
- each wiki page, event, article, etc. could be associated with a tracker (a bit like Page Selector), and thus, we could add tracker fields at will. We would need a way for these tracker fields to appear in the interface via tpl, or module?
Plugin generator app
Example for PluginTermEntry
- field_a (element name, label)
- field_b (element name, label)
- field_c (element name, label)
- field_d (element name, label)
Element name are unchangeable system names
Labels are using PluginTR.
See PluginExercise for examples of dropdown vs text field
PluginHelper to create or edit (to make a nice table)
In view mode: show all, including non specified
field_e (can be added later and simply has no data for previously entered entries)
All data is maintained à la PluginConvene (searchable, history, permissions, etc.)
Questions: How to make a template for the page, given that not all the data may be in the plugin?
{TERMENTRY( field a = abc field b = def field c = ghi field d = jkl )} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce placerat eros id dui bibendum id interdum elit posuere. Duis enim tellus, laoreet non posuere eu, convallis a felis. Quisque vehicula placerat tempus. Ut dictum dolor nisi. Vestibulum tempor consequat placerat. Praesent gravida lacus sem, sit amet eleifend sem. Aenean rutrum blandit pellentesque. Suspendisse eu augue lacus, non porta diam. Ut ut odio nec mi sagittis aliquet non eget diam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse lobortis, quam a ornare auctor, massa odio viverra augue, vitae aliquet tellus nulla et lectus. Fusce nec ligula a tellus pellentesque semper. Nunc non ipsum ligula, aliquam pharetra nibh. Donec nulla eros, vestibulum at porta vel, venenatis id tellus. Sed ullamcorper, libero ut porttitor lobortis, nunc mi mollis turpis, dictum consectetur risus metus sed arcu. Nullam facilisis, metus id iaculis varius, orci quam elementum quam, sit amet consequat urna metus sit amet nunc. Vivamus id nibh et dolor blandit ullamcorper eget quis purus. Phasellus lectus nisi, tincidunt eu viverra a, adipiscing nec nisl. Praesent adipiscing, est nec tempor pellentesque, libero dui cursus magna, nec placerat ligula tellus a purus. Nulla interdum eleifend congue. Nullam lorem odio, bibendum vitae aliquet id, fringilla id tellus. {TERMENTRY}
Note that this approach would not only support page metadata. It would also support extendable page templates. At the moment, page templates cannot be changed easily once you have created some pages with it.
For example, say you create a TermEntry template, which has headings: Definition, Synonyms, To be Avoided. You create 300 terms with that template. Later, you decide that a TermEntry should also have a heading called "Regional Variants". You can of course add this heading to the template, and all TermEntries created in the future will have this new heading. But the 300 existing term entries won't.
With the approach proposed here, you could add the new field "Regional variants" to the definition of the TermEntry plugin. The fact that the 300 existing TermEntries don't have a value for that new field doesn't matter. Tiki could still render the TermEntry plugin with an empty "Regional variants" field, signalling to the readers and contributors that this field exists on that page, although it's currently blank.