User talk:Allsorts

From SME Server
Jump to navigationJump to search

Category Template Creation

First fiddles with creating a category template that will enable the easy moving of pages from one category to another by simply editing the template. How ever I did read somewhere that this may not actually work without opening and saving each page where the template is used, which isn't very helpful. The same bit of text also mentioned something about a "job queue" so perhaps the chnage isn't instant but happens eventually.

I'm also not exactly sure how the category > sub-category system works in the wiki. Can you specify a "path" like Archive:Development:SME9? I have sneaky feeling that the categories are "flat" rather than a "tree". So once the category "SME9" has been used that is it, you can't have "SME9" under Archive:Documentation:SME9 and Archive:Development:SME9 with different pages in each area.

Below are my first faltering steps. I haven't really thought through the logic required to achieve what we want, or looking at the above, if what we want is even possible. This is more a test of how the #switch selector works.

The Template


A template to enable pages to move categories by simply editing the template.

 {{ Test_Category | version=<SME_Version> | category=<Category> }} 


<SME_Version> is the version of SME that the page where the template is used refers to.
  For example 9 or 8.

<Category> is a predefined code for the destination category:
  Doc > Documentation
  Dev > Development


{{switch: version
  | 9 = SME9
  | 8 = SME8
  | #default = No version

{{switch: category
  | Doc = Documentation
  | Dev = Development
  | #default = No Category