Tutorial: Organize how the templates appear and remove default templates from the list on the NewPage
[EDIT] This page won't allow me to show you the scripts, check this link out for this same text with the code shown http://magicwiki.pbwiki.com/f/Tutoria...
Hey guys, until PBWiki allows us to set the order of the template list, and which templates to display, here's a quick and dirty workaround. For an example of how I'm using this in my own Wiki, check http://magicwiki.pbwiki.com/New-Page
First, you'll need to create a new page and name it NewPage. Next you'll need to add a new "HTML/JavaScript Plugin", check "Allow JavaScript" and Copy+Paste
the following:
This function determines how to create the page by checking the Name you assigned it, and the template to use. Next, create another plugin and add the
following to it:
This function actually creates the page. Simply change WIKINAME to the name of your wiki. Now we need to create the forms the users will interact with,
including the Name, the creation button, the folder to store the page in, the security settings, and the template to use. To add the Name field and Create
Page button, add another Plugin with the following:
For the Folder, add the following into another Plugin:
Next, the security settings in a separte Plugin:
And finally, the list of templates to use:
It's that easy. The only thing you need to do is manually enter in the templates you want to use, and manually update the folder list. You'll also need to provide the user with a link to this page, as I don't know how to edit the "Create a Page" button at the top of the screen to redirect you to your new "Create a Page" page. Anyways, I hope this tutorial helps!
Hey guys, until PBWiki allows us to set the order of the template list, and which templates to display, here's a quick and dirty workaround. For an example of how I'm using this in my own Wiki, check http://magicwiki.pbwiki.com/New-Page
First, you'll need to create a new page and name it NewPage. Next you'll need to add a new "HTML/JavaScript Plugin", check "Allow JavaScript" and Copy+Paste
the following:
This function determines how to create the page by checking the Name you assigned it, and the template to use. Next, create another plugin and add the
following to it:
This function actually creates the page. Simply change WIKINAME to the name of your wiki. Now we need to create the forms the users will interact with,
including the Name, the creation button, the folder to store the page in, the security settings, and the template to use. To add the Name field and Create
Page button, add another Plugin with the following:
For the Folder, add the following into another Plugin:
Next, the security settings in a separte Plugin:
And finally, the list of templates to use:
It's that easy. The only thing you need to do is manually enter in the templates you want to use, and manually update the folder list. You'll also need to provide the user with a link to this page, as I don't know how to edit the "Create a Page" button at the top of the screen to redirect you to your new "Create a Page" page. Anyways, I hope this tutorial helps!
1
person likes this idea
I like this idea!
Tell me when this idea gets some attention.
The more people who like this idea, the more it gets noticed.
The more people who like this idea, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Thanks for the tip Carlos,
What would we need to do to our Templates to get to where you are trying to go with these JS examples?
-
Inappropriate?Really, the only thing I feel needs to be done is allowing us to organize the order in which the templates are shown. Even a change as simple as listing the User-Made Templates first, and defaults last would be great. The problem is that eventually when my wiki gets bigger, I'll be using several dozen different templates for each area of Magic tricks...to create uniformity and make it A LOT easier for my users to create pages - at that point all they need to worry about is putting up the text, everything else is done for them.
It isn't something major though, and most people probably overlook it. But like I said, having the user-made templates appear first would be a MAJOR plus.
Loading Profile...


