To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit ff947b32 authored by vermeul's avatar vermeul
Browse files

update categories

parent a2e3ad1a
......@@ -56,18 +56,36 @@ So if we want to annotate a written subtraction example, we simply write:
```
Note: **the combination of parent_category/child_category must be unique**
### insert new category
### add a new category
To insert a new category into the categories table, we simply add one of the following anywhere in a Wiki Page:
To add a new category into the categories table, we simply add one of the following anywhere in a Wiki Page:
```
{{#annotcat: add | new top category:description }}
{{#annotcat: add | new category:description | parent_category }} # add to an existing top category
{{#annotcat: add | new category:description | grandparent_category/parent_category}} # identify a node
```
### delete an existing category
To delete a category, add this to any Wiki Page:
```
{{#annotcat: del | kat_parent/kat_child }}
```
It will delete the category from the database. Annotations will still be there, but no longer assigned to a category.
If this category was a parent- or child-category, then this connection will break and you might not receive the same
results as before when searching for annotations. Therefore: be careful!
Before page gets saved, and after these categories are added/removed,
these parser functions are removed from the Wiki Page source.
### update an existing category
To update a category, add this to any Wiki Page:
```
{{#annotcat: up | kat_parent/kat_child | new category name : new description | grandparent_category/parent_category }}
# alternative, maybe?
{{#annotcat: up | kat_parent/kat_child | name='new category name', description='new description', parent='grandparent_category/parent_category' }}
```
If you do not want to update certain fields, just leave them empty.
### list existing categories
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment