#12265 closed enhancement (fixed)
Permit arbitrary absolute wiki page names in wiki edit template= argument
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Milestone: | 1.3.2 |
Component: | wiki system | Version: | |
Severity: | normal | Keywords: | PageTemplates |
Cc: | Branch: | ||
Release Notes: |
Absolute path to wiki page can be passed in the |
||
API Changes: | |||
Internal Changes: |
Description
Attached is a small enhancement to trac core wiki/web_ui.py. Please consider including this patch in a future version of trac.
When editing a new wiki page, it is possible to select from template pages placed under PageTemplates/, and it is possible to pass a template= argument directly along with an edit link to select the specific template to use.
I came across this feature recently when reviewing the trachacks:wiki/WikiCalendarMacro which has a base=template parameter to select the template to use when creating a new calendar subpage. For this use case, it is not really useful to be forced to place the template under PageTemplates/ where it will _also_ be visible in the new wiki page template dropdown box; these kinds of templates are only useful for the specific calendar.
To this end, I came up with this enhancement patch. If the template argument starts with a slash, e.g. template=/some/template, that absolute path is directly used as the source page, omitting the PageTemplate/ prefix that is otherwise hardcoded.
NOTE: patch is against trac 0.11.7 as that's what I'm still using. I had a look at the code in current trunk - it's unchanged, so the patch should apply with some offset.
Attachments (1)
Change History (6)
by , 9 years ago
Attachment: | trac-absolutetemplate.patch added |
---|
comment:1 by , 8 years ago
Milestone: | → 1.3.1 |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:3 by , 8 years ago
Milestone: | next-dev-1.3.x → 1.3.2 |
---|---|
Release Notes: | modified (diff) |
Proposed changes in [3e7d2bc7/rjollos.git].
comment:4 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Committed to trunk in r15764.
comment:5 by , 7 years ago
Keywords: | PageTemplates added |
---|
Sorry for the long delay in reviewing the patch. I'll look at it for milestone:1.3.1.