Ticket #962 (closed enhancement: fixed)
Opened 7 years ago
Last modified 5 years ago
Customizable Default Wiki Text
| Reported by: | ksmith@… | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11 |
| Component: | wiki system | Version: | none |
| Severity: | normal | Keywords: | page templates |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
It's handy to be able to change the default wiki text from "describe PageName here" to "= PageName =", etc...
Possible implimentation could use configuration or search for a wiki page called WikiDefaultText?.
Attachments
Change History
comment:1 Changed 7 years ago by vittorio
- Component changed from general to wiki
- Severity changed from normal to enhancement
comment:2 Changed 7 years ago by sarahg@…
comment:3 Changed 7 years ago by cmlenz
#1193 has been marked as duplicate of this ticket.
comment:4 Changed 7 years ago by cmlenz
#1470 has been marked as duplicate of this ticket. It also provides a patch.
comment:5 Changed 7 years ago by anonymous
I definitely prefer being able to select from one of several page templates when creating pages.
Those templates would have to be customizable, of course. Some other Wikis allow this simply by appending "Template" to the page name. Perhaps a special PageTemplates wiki might be a better approach.
For example, if we created PageTemplates/MeetingMinutes?, PageTemplates/Requirement?, and PageTemplates/Blog? in our Wiki instance, "MeetingMinutes?", "Requirement", and "Blog" would appear in our page template list whenever we edit a page for the first time.
comment:6 Changed 5 years ago by anonymous
#2179 has been marked as a duplicate of this ticket. It also provides a patch.
comment:7 Changed 5 years ago by cboos
- Keywords page templates added
- Milestone set to 0.11
- Owner changed from jonas to cboos
- Status changed from new to assigned
#3859 was also marked as duplicate... I guess it's about time to implement this ;)
Proposal
If no PageTemplates/... page exist, simply behave as usual.
If there are some, there will be a select field to pick one of those next to the Edit button for a non-existing page. We'd need some mechanism to specify the default template too, maybe just picking PageTemplates/Default? if it exists, otherwise selecting the empty option, which would mean start with a blank page.
Implementation follows...
Changed 5 years ago by cboos
- Attachment wiki_page_templates-r3886.patch added
Implements the PageTemplates/... idea.
comment:8 follow-up: ↓ 9 Changed 5 years ago by cboos
Please try out attachment:wiki_page_templates-r3886.patch
One thing that could be changed is to make configurable the name of the default template, as PageTemplates/Default is perhaps not that obvious (could as well have been PageTemplates/WikiPage).
Anyway, I guess a new PagesTemplates explaining the feature would have to be added.
Note that the user interface is not changed at all from the former one if there are no PageTemplates/... pages.
Finally, the WikiPage.select_names could be reused in a few places (PageIndexMacro and WikiSystem come to mind).
comment:9 in reply to: ↑ 8 Changed 5 years ago by mgood
Replying to cboos:
Please try out attachment:wiki_page_templates-r3886.patch
One thing that could be changed is to make configurable the name of the default template, as PageTemplates/Default is perhaps not that obvious (could as well have been PageTemplates/WikiPage).
I don't see a reason to configure it, though PageTemplates/DefaultPage would be CamelCase, so it's easier to link to. I think adding the PageTemplates page with a link to the default template would be fine.
comment:10 Changed 5 years ago by cboos
- Resolution set to fixed
- Status changed from assigned to closed
Ok, so let's keep PageTemplates/DefaultPage?.
Slightly refined patch applied in r3881 (now the PageTemplates/ prefix doesn't appear in the list anymore, that's a bit nicer).



I like this idea. I'd just like to add that multi-line text should be possible. When I found this ticket I was originally going to suggest adding a newline to the end of the standard "Describe WikiPage? here" text because often I'm about to paste something in and want what I paste to be separate from the text that's already there (which I don't dare select with the mouse when I'm about to paste something).