Create Categories

Posted by Phil Chett on 29 May 2007 14:42, last edited by DrCaduceus on 19 Oct 2014 12:34

: admin category permissions setting site

rating: +17

What is a category?

In principle, a category is a class (think of a name or concept) that serves to group together related things, like objects, ideas, etc. Thus, cars is a category for certain type of vehicles, different to that of motorcycles, or trucks. The main advantages of categories are, thus, to group related objects (those pertaining to the same category) as well as to differentiate them from unrelated ones (those pertaining to different categories).

What is a category in Wikidot?

In Wikidot, categories have similar connotations. However, categories are rather a tool for Site managers, and not so much for users. Let's be a bit more specific here:

  • The best way of categorizing pages at user's level is with the Tags function. This way each page can be categorized into its most relevant tags, and the site will list them automatically under those tags. This facilitates searching for related pages by using the Tags cloud.
  • At administrator's level, however, you can use categories to better manage your site. For example, you can set different themes for each category (e.g. a picture of motorcycles or of cars, depending on the category), set different permissions for each category and change those permissions as you see fit over time. It is at this level that Wikidot categories work.
cats.JPG

If you want to see how "Categories" are set up, go to Site manager->Appearance->Themes and you may see there a list showing all the existing categories within a site. Alternatively you can use Site Manager->Permissions to see the same list.

This means that there are different categories of pages which divide a site into manageable sections. Some categories are editable by everybody, others are only editable by site members, and others are restricted to administrators only. Using the theme manager, each category can have its own theme or appearance, with navigation elements (such as sidebar menus) tailored for each separate category. For example, if you have a wiki about the history of the Napoleonic Wars, you can include a completely separate category within that wiki about Period Uniforms/Dress. Keeping the two subjects in the same wiki is clearly preferred, but mixing all those pages up together could lead to some messy navigation issues. Separating them by using different categories solves the problem.

How to create categories step-by-step

Step one: create a category

Categories are created automatically with the Add a new page function in your wiki. In order to create a category, make sure that you name the page as categoryname:pagename. For example, you want the category cars, and the first page you want to write about is BMW. Then you Add a new page entitled cars:BMW.

When the editor opens, you will notice that you have a page entitled cars:BMW. What you don't notice is that Wikidot has also created a category called cars, to which this page pertains.

Once you hit the Save button in your editor, the following will happen in your wiki:

  • a category: a new category will be created with the name cars (this is so because you commanded it by writing cars: in your title). Notice that if you don't want to create a new category…do not use anyname:…!
  • a page name: a new page, pertaining to the category cars:, is created with the name cars:BMW (this is so because you commanded adding a new page entitled "BMW" to be category "cars:"). However, pages pertaining to Wikidot's standard categories (e.g. system, admin, etc.) will only show the title but not the category they pertain to (e.g. you add a new page as system:XXX, but the editor opens a page entitled XXX). This is so because Wikidot hides the category part. To make sure that your page pertains to a given category, you can always read the page URL (it will show http://www.../system:XXX).
  • a page title: the title of your page will probably appear as cars:BMW but its title can now be simplified to BMW. If you re-edit the page and delete the cars: part of the title, the page will be listed as BMW…but it is still under the "cars:" category (you can double-check this by looking at the URL!). This is handy if you don't want to show the category name in the title for aesthetic reasons. However, if you have similar titles for pages in different categories (e.g. motorcycles:BMW, and manufacturers:BMW), they will all be listed with the same title (in our case, BMW). To make sure you are writing under the right category, double-check the URL!

To summarize, then. To create a category, Add a new page using the "create page" in the "nav-side". Create this page by first putting in the category name, followed by : and then the page name itself , e.g.:

Newcat:page1

Step two: add more pages to your category

Any pages that you want to include into a category needs to be entitled categoryname:pagename. By so doing, Wikidot automatically puts the new page into the corresponding category. For example, cars:Mercedes, or cars:Volvo. Again, after you have Saved the page, you can re-edit it and delete the category: part off your title knowing that you will be able to see its category in the URL of the page.

In brief, to continue to add new pages to this new category using "Add a new page", just type the category name, : and the new page name. eg

Newcat:page2
Newcat:page3
Newcat:page4

(Note: any internal wiki pages that reference a page within a specific category MUST have the category name listed as part of the page name. For instance, "page2" is not the same page as "Newcat:page2").

Step three: re-allocate pages to other categories

As always happens, you may find yourself in the predicament of having the right page in the wrong category. For example, you put Seat under motorcycles: and you want to change it to its appropriate category cars:. If you edit the page and change the original title motorcycles:Seat to cars:Seat, the page will still remain in the category motorcycles: but with the new title cars:Seat. This is so because you are only changing the page title and not the page name.

To change the page name to the appropriate category, you need to go to the page (use Search, List all pages, or Tags), click on +options and, then, Rename. Rename the page into cars:Seat, and your page will be moved to the cars: category. What you are doing in this step is acting upon the page name, effectively changing the page to a different name and, thus, category. Indeed, you can double-check the URL, and you will see the page in its new category.

If necessary, you now need to go and change the title of the page. For this, you need to Edit your page and change the title to cars:Seat (or, simply, Seat). In this step you are acting upon the page title (otherwise, if you don't change the title, it will still read the same -e.g. motorcycles:Seat-, but will be under other category -i.e. cars:).

Step four: manage your categories

If you now go and look into Site managerPermissions you will notice that any new category (e.g. Newcat) is in there. You will also notice other existing categories in the list provided (these were automatically set up at the time the wiki was created). Do not delete any of these, if you want your site to work correctly!

Different permissions can now be assigned to each category as necessary.

Other features, such as appearance, navigational elements, etc, can also be tailored to each particular category.

cat2.JPG

Assigning pages to categories automatically

You might find it useful to assign pages to their categories automatically instead of having to write the category manually. Furthermore, this is most helpful if your site has different categories and it is open to the contribution of others. Other people are less aware of how the site is structured, and will probably create new pages in the "_default" category. This means that you will probably have to go back and rename pages into their appropriate categories continuously.

A nice solution is to build Add a new page functions into your site which automatically allocate pages to their corresponding categories.

Step one: create your category

The first step is to create a category as we did above (e.g. for cars).

For the time being, however, let's say we are creating a category from scratch. Thus, do the following:

  • Create a category called Food by way of creating a new page called food:addpage.
  • Save the page.

This will automatically create the category Food and a page called AddPage.

Step two: build in the Add a new page function

Now we want to build in the Add a new page function within the category Food. To do so, we need to add the corresponding syntax (a module, actually) into a page in that category. But, because we already have a page called AddPage (which has no relation to food whatsoever!), we can use that page.

In our example, we, thus, do the following:

  • Open the page Food:AddPage.
  • Edit it and write the following code:

[[module NewPage category="food"]]

  • Save the page.

When you have finished, you will have a functional Add a new page with a difference: every page created using this function automatically adds the new page to the category Food (check the URL and you will see it)!

Step three: tailoring your Add a new page function

By now, you may want to tailor this function to your needs. The most obvious one is to rename it, for example, to rename the button to new food. You can edit the syntax as appropriate, for example:

[[module NewPage category="food" size="15" button="new food"]]

This syntax will give you an Add a new page button similar to the one that you got by default in Wikidot's Side navigation panel. The only exceptions are that it opens a new page in the category Food: (instead of in the "_default:" category), and it names the button as new food (instead of as "new page").

By now, you may as well wonder whether you could write this function in your Side navigation panel or not. Yes, you can! Simply copy and paste above syntax onto the nav:side page.

You can even substitute the original "new page'' button with the new food one.

This "tailoring" exercise is to show you that once you have a Category:addpage created, you can put that function in other pages, such as the side navigation panel, a page specifically created for adding new pages, a starting page for the category, etc. And, by the way, the page does not need to be called AddPage. It could, as well, be your Start page for the category, or any other page.

Step four: "new pages" for more than one category

By following above steps, you can create further Add a new page functions for multiple categories. However, you may find it handy to put all those functions in one place after renaming each of them appropriately to avoid confusion. Two options are suggested in order to list them in a place that is convenient for your contributors:

  • List them in the Side navigational panel. This is quite convenient but impractical if you have many categories.
  • Edit the Add a new page function from your Side panel so that it links (and opens) a new page where you have listed all those category-linked "new pages". This is quite convenient if you have multiple categories.

Listing categories

[[module Categories]]

_default

admin

admincss

admin-sandbox

app

archive

banners

blog

bugs

caldemo

css

deleted

erichsteinboeck

featured

forum

glossary

guestbook

help

helpon

home

howto

howto-test

howtotopics

inc

live-template2

main

nav

newpage-test

newpage-test2

press

protected

sandbox

screenshots

search

senioriousc

staff

start

start-ideas

stories

system

system2

talk

transition

tsangk

user

wishlist

Further reading:

http://community.wikidot.com/glossary:category
http://community.wikidot.com/forum/t-8053/using-categories
http://community.wikidot.com/forum/t-6269/how-to-create-a-category

Authors
An SB collaboration between

Phil Chett Phil Chett . Please visit his/her userPage.

Helmut_pdorf Helmut_pdorf . Please visit his/her userPage.

kimboosan does not match any existing user name. Please visit his/her userPage.

JDPerezgonzalez JDPerezgonzalez . Please visit his/her userPage.


Related articles

Comments

Creating categories

Hi. There are no instructions on how to create a category, but on what to do with them. So the title does not match the content. The article says:

"Once it is decided that a category is needed within a wiki, the first thing to do is create it. But first, look in…"

"Next, create a new category. For this example a…"

So I bit of information about how to create categories would be nice.

by alfredo_elejalde alfredo_elejalde , 05 Jun 2008 15:30
Re: Creating categories
leiger leiger 06 Aug 2009 15:50

All you need to do is create a page in a category, and that category is automatically created.

For example, you can create pages by simply typing the page name into the URL bar at the end of your website's URL:

http:// your-site.wikidot.com/new-page-name-here

To create one in a category, just do this:

http:// your-site.wikidot.com/category-name-here:new-page-name-here

—-

edit: oops, has already been answered..


~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server

Last edited on 06 Aug 2009 15:53 by leiger
by leiger leiger , 06 Aug 2009 15:50
Categories automatically created

When I checked the list of categories for the first time, there was one clearly related to the content I had already published, but that I hadn't created. So it was created automatically. The category had the same name as one file of one article posted in my wiki. How comes? Any thoughts? Is there a way to control this automatic production of categories?

by alfredo_elejalde alfredo_elejalde , 05 Jun 2008 15:33
Re: Categories automatically created
Phil Chett Phil Chett 05 Jun 2008 16:35

as soon as you stick : in a page name eg
fred : john
the category "fred" is set up, and the page in that category is called "john"

by Phil Chett Phil Chett , 05 Jun 2008 16:35
Re: Categories automatically created
Helmut_pdorf Helmut_pdorf 05 Jun 2008 17:57

Have a look on the glossary entry "category" (http://community.wikidot.com/glossary:category )

here is the used category named "glossary" … :)


Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.

Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?

by Helmut_pdorf Helmut_pdorf , 05 Jun 2008 17:57
Re: Categories automatically created

Thank you very much.

by alfredo_elejalde alfredo_elejalde , 07 Jun 2008 04:25
Thankyou!
spinster spinster 03 Oct 2008 18:42

This is really useful, but it took me ages to find this information. I bet loads of people would like some bits of their site to be public and some, private, or various other combinations of permissions. It would be good to make a prominent link to here from the users section of the documentation pages.

by spinster spinster , 03 Oct 2008 18:42
ANiceUSER ANiceUSER 06 Aug 2009 15:37

How to delete a category?
Also once deleted all pages of a X-named category, X is still listed with [[module Categories]] or in "Page Templates" (within ManageSite module).

Last edited on 06 Aug 2009 15:38 by ANiceUSER
by ANiceUSER ANiceUSER , 06 Aug 2009 15:37
Re:
leiger leiger 06 Aug 2009 15:55

Firstly, just make sure you haven't forgotten to delete any pages in the X-named category…

I've heard of this happening at least on one other occasion. Might be a bug .. just wait for pieterh to see this (or send him a PM if he doesn't post here within a few days) (edit: or not tongue-out) — they're able to look at the situation in more detail.

~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server

Last edited on 07 Aug 2009 01:19 by leiger
by leiger leiger , 06 Aug 2009 15:55
Re:
pieterh pieterh 06 Aug 2009 16:19

No, please no PMs. I hate them. They interrupt my workflow and drag me off to some dark corner where every click takes ages.

Comment on this site, or on the blog.wikidot.com and I'll read it.

I've heard of this problem a few times. Categories are supposed to be deleted automatically when the last page is deleted but there are cases where it does not happen. To be investigated.

by pieterh pieterh , 06 Aug 2009 16:19
Re:
GoVegan GoVegan 06 Aug 2009 21:41

Perhaps there is no bug, Pieter. If you have a page beginning with an underscore, then it is ignored by:

  • Pages module
  • ListPages module
  • PageCalendar module
  • The undocumented Categories module
  • NextPage and PreviousPage modules
  • PageTree module

Wikidot currently has ZERO ways to show a hidden page within a category. So if somebody creates a page category:_vandalism, then you will never be able to delete the category, because you don't know the name of the page that exists. Unless you check the site's list of changes, but that's just plain tedious.

This is why we've been heavily requesting an showHidden="true" attribute with the ListPages module. But that should also exist on the other modules mentioned above, so that hidden pages aren't permanently hidden.

by GoVegan GoVegan , 06 Aug 2009 21:41
pieterh pieterh 06 Aug 2009 21:57

So, two ways to know exactly what pages there are:

  • system:list-all-pages
  • make a backup

However I agree about the need to show hidden pages optionally in lists.

At some stage we will want to redesign the ListPages module, please come back with these ideas then. I've already tracked a bunch of other necessary changes.

by pieterh pieterh , 06 Aug 2009 21:57
Re:
GoVegan GoVegan 06 Aug 2009 22:10

So, two ways to know exactly what pages there are:

  • system:list-all-pages

Actually, that uses the Pages module, which does not list hidden pages. It's easy to check this:

  1. Go to any system:list-all-pages page of a site you KNOW has a hidden page (i.e. :_template)
  2. On the List All Pages page, view the HTML source code
  3. Search the source code for :_template

There will be zero results.

It's ironic that the List All Pages page does not list all pages.

by GoVegan GoVegan , 06 Aug 2009 22:10
Re: How to delete categories
(account deleted) 06 Aug 2009 17:13

Did/Do you have autonumbering enabled for the category you're trying to delete? I had a puzzling experience with this recently. You can read about it here (and the post below it):

http://community.wikidot.com/forum/t-171887/easier-way-to-install-wikidot-packages#post-551978

Might help, might not. Let us know!

-Ed

by (account deleted), 06 Aug 2009 17:13
Re: How to delete categories
ANiceUSER ANiceUSER 06 Aug 2009 18:03

I never enabled autonumbering.

by ANiceUSER ANiceUSER , 06 Aug 2009 18:03
Re: How to delete categories
Helmut_pdorf Helmut_pdorf 07 Aug 2009 07:13

As pieter said:

So, two ways to know exactly what pages there are:

* system:list-all-pages
* make a backup

Now - we know that "system:list-all-pages" does exact this not! :)

BUT: "make a backup" shows you all txt files under your site url!

  • make a backup
  • download the zip file to your PC / Mac
  • unzip the file to the directories (files, sources

And you will have a backup of your text & files
and see (sorted by categories) all the existing pages…in the "sources"

That works always - but only for admins


Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.

Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?

by Helmut_pdorf Helmut_pdorf , 07 Aug 2009 07:13
Re: How to delete categories
pieterh pieterh 07 Aug 2009 08:13

You're right!

list-all-pages does not show templates… :-(

by pieterh pieterh , 07 Aug 2009 08:13
Re: How to delete categories
ANiceUSER ANiceUSER 07 Aug 2009 19:51

I used the backup method. Tortuous but working fine, thanks :)
("X__template.txt" file indicates that category X has an invisible "_template" file so you must also delete it to completely delete the category)

by ANiceUSER ANiceUSER , 07 Aug 2009 19:51
Is the Category Vault Difficult?
pm58790 pm58790 04 Jan 2014 20:35

I'll figure that one out.

by pm58790 pm58790 , 04 Jan 2014 20:35
is this category related with commercial
ItZz Ali ItZz Ali 18 Dec 2017 14:09

i am still unable to show the templates for more subkuchsell local ad classifieds

by ItZz Ali ItZz Ali , 18 Dec 2017 14:09
Helmut_pdorf Helmut_pdorf 18 Dec 2017 14:18

? ?
What are you meaning exactly?

Which site, which category, which (live) _template ?
You have not made any page-edits, no site, no other posts on Wikidot.

Edit
Don't posts links to a s u b k u c h s e l l site here on Wikdiot wihtout having a pro account! Otherwise you are a spammer and will be deleted soon.


Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.

Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?

Last edited on 18 Dec 2017 14:20 by Helmut_pdorf
by Helmut_pdorf Helmut_pdorf , 18 Dec 2017 14:18
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.

AltStyle によって変換されたページ (->オリジナル) /