Loading...
 
Allow users to change the category of a page

Module change_category

This module allows a user to change the category of a wiki page. It is only displayed if the category feature is on and if you are on a page.

There are 3 different types of display:

  1. A simple display consisting of a drop down list where the current categories are selected:

    This code:
    Copy to clipboard
    {MODULE(module="change_category" id="4" title="language") /} {MODULE(module="change_category" id="8") /}

    Produced:
    Image

  2. A display with more detail: the assigned categories are shown in a table with a button to unassign the category, and the additional categories that can be assigned are shown in the drop down list.

    This code:
    Copy to clipboard
    {MODULE(module="change_category" id="10" detail="y" categorize="categorize") /}

    Produced:
    Image
  3. A display consisting of a combo box where you can select one or many categories from the full list of categories:

    An example in http://profiles.tiki.org, once you are logged in as user, and you are in a wiki page like "r_test":
    Click to expand
    Click to expand


Parameters

Parameters Value Required? Description Since
id ID optional The category ID if you want to limit the categories to the subtree of categories under this category(this category is not included)
shy y or n optional Shows the module only if the page is already categorized - default n
notop 1 or 0 optional In non-detailed view, disallow uncategorizing. Example value: 1. Not set by default.
detail y or n optional If y, the module displays a more detail view - default n 2.0
categorize text optional The first text in the drop down list. By default 'categorize' tw>=1.10
multiple y or n optional In the simple display, can select multiple categories instead of 1 - default 1 category can be selected only 2.0
path y or n optional Displays the category path (mother::daughter) or the category name - default y 2.0
group y or n optional Keep the categories (all or the subtree from id) only the categories whose name is beyond the groups name the user belongs to. The categories subtree from a category matching a group name is also kept - default n 2.0
add y or n optional If n, will not display the tools / allow to add a new category - default y 2.0
del y or n optional if n, will not display the tools / allow to delete a category - default y 2.0
imgUrlNotIn url optional Url of the image to display if not in the only category. The id category must have only one children category to have this parameter working. The param imgUrlIn must be given to have this option working.(ex: tiki-download_file.php?fileId=1) (ex: img/tiki/toto.png) 4.0
imgUrlIn url optional Url of the image to display if in the only category.The id category must have only one children category to have this option working. The param imgUrlNotIn must be given to have this option working. 4.0

Example: Use this module to toggle a category

This code:

Copy to clipboard
{MODULE(module="change_category" id="1" imgUrlNotIn="dl7" imgUrlIn="dl8" title="Statute") /}

Would produce:
Image

And after clicking on the icon:
Image

 Tip

You can use this module multiple times on a page.


See also:
Category Transitions, PluginCategory, Module last_category_objects and Module categories

See these pages for information that applies for all modules: