SID-02186: Page "editor" or owner
| Status: |
Asked |
TWiki version: |
6.0.1 |
Perl version: |
v5.20.2 |
| Category: |
|
Server OS: |
Debian Linux 8.4 |
Last update: |
9 years ago |
In order to help maintain an ever-growing list of topics, we'd like to delegate an "owner" or "editor" to pages. We've looked at using TWiki metadata to implement this, but it occurs to me that we're probably not the first people to try to do this, and it would be good to learn from what others have done.
Ideally, the page editor (a TWiki user) would be inherited from the parent topic, but could be overridden if needed. Search by page editor would be nice to have.
Thoughts, ideas for implementation, examples, etc, all welcome!
Thanks,
Keith
--
Keith Edmunds - 2016-04-06
Discussion and Answer
I recommend to add a
TWiki Form called WebForm to the
WebTopicEditTemplate in the relevant webs (or Main.WebTopicEditTemplate for all webs) that has at least two fields: A Title and a Owner. The Title is a normal text field, the owner a select, with options set to the list of users. For the list, provide your own static list, a search, or use
%USERREPORT{ action="user_list" }%.
Now you need to add the form to all existing pages. That is labor intensive. You could use the
GlobalReplacePlugin to add the form in one swoop. To add the WebForm with a web-global search & replace, add
%META:FORM{name="WebForm"}%\n at the
end of the topic. That is a bit tricky if you have existing TWiki apps with forms, which you must exclude (a topic can only have one form).
To inherit the page owner from the parent when you create a topic is not done automatically. You would need to create a custom HTML form to create a child topic (perhaps in an INCLUDE on every page via template). That custom HTML form would ask for the topic name, topic Title, and owner, with owner pre-selected to the current page's owner. Alternatively you could customize your TWiki.WebCreateNewTopicTemplate topic (and remember to reapply the changes on the next TWiki upgrade).
A SEARCH can be easily done to search topics by owner. See
VarSEARCH and
FormattedSearch.
--
Peter Thoeny - 2016-04-06
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.