|
Cookbook /
SerialPageNamesSummary: Markup expressions to create serial page names
Version: 2008-05-25
Prerequisites: PmWiki 2.2.0
Status: new release
Maintainer: HansB
Questions answered by this recipeHow can I create numerical page names which increase automatically for every new page? DescriptionThe script includes markup expressions to help with creating serial page names. Now part of PowerTools! Download powertools.phpΔ, copy to your cookbook folder, and install in your local config.php by including: include_once("$FarmD/cookbook/powertools.php");
This provides you with a number of new markup expressions, which you can use in your pages, and especially in your forms for producing new serial pages.
Example using a form processed with FoxThe following form will display just a button. When clicked the form will create a new serial page in group ToDo using the Name part prefix of Jack-, basing the new page on a template page Site.ToDoTemplate. The user will be redirected to the new page. (:messages:)
(:fox newtodo template=Site.ToDoTemplate redirect=1:)
(:input hidden target '{$$(serialname ToDo Jack- )}':)
(:input submit post "Create New ToDo Page":)
(:foxend newtodo:)
Note that the serialname expression is enclosed in hyphens, and that it is used here as a replacement variable NotesRelease Notes
See Also
ContributorsComments$SerialStart doesn't seem to have any effect. Setting $ThreadStart to $SerialStart in the code fixed the problem. Is this a bug or did I miss something? JHJ, 2008-05-25 It was indeed a bug. Now fixed. Thanmks for pointing this out! - HansB May 25, 2008, at 02:27 AM
User notes?: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date * (-) Optional negative comment. Name, date These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |