View Full Version : Serialize Page Names
markhr
02-02-2010, 04:26 AM
I'm trying use MindTouch DekiWiki for a knowledge base system I'm hoping to design. I know how to use wiki.create to create a new page, and I could use it's auto numbering feature (it will append (1) (2) and so on to the end of the page title if there's already a page with that same name).
What I would like to do is create the page title based on a parameter that includes a starting number and increment value, and also continue in consecutive order (i.e. if page 1000 was deleted, it will not create a new page 1000).
So that way I could have page titles like: kb1000, kb1001, kb1002, and so on.
Any ideas? Thanks ahead of time.
rberinger
02-02-2010, 12:14 PM
I'm trying use MindTouch DekiWiki for a knowledge base system I'm hoping to design. I know how to use wiki.create to create a new page, and I could use it's auto numbering feature (it will append (1) (2) and so on to the end of the page title if there's already a page with that same name).
What I would like to do is create the page title based on a parameter that includes a starting number and increment value, and also continue in consecutive order (i.e. if page 1000 was deleted, it will not create a new page 1000).
So that way I could have page titles like: kb1000, kb1001, kb1002, and so on.
Any ideas? Thanks ahead of time.
You can take a look at this thread: http://forums.developer.mindtouch.com/showthread.php?t=6286 for some helpful insights. It wont pass by page names that already exist but that could be overcome by page properties if really needed.
If the absolute consecutive ordering is not really the goal but rather the uniqueness of the numbers you could use page.id. It will always be unique but not necessarily in a predetermined numbering order.
You would have to have something in place to create the page insert the page.id and then "move/rename" the page to include the page.id. We have also done a knowledge base here and have adopted a chonological system where the effective date becomes the kb title number, i.e.
On Jun, 25 2010 @ 12:12:45 we make effective a new knowledge base article. The KB article title becomes: KB-06252010-121245.
Powered by vBulletin™ Version 4.1.3 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.