Opened 20 years ago
Last modified 14 years ago
#1376 new enhancement
Alternate Template for wiki pages
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | next-major-releases |
Component: | wiki system | Version: | 0.8.1 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Alternate templates for wiki pages could come really handy when you need to format the wiki text for the end users. For example users can click on a help button and the we can pop up a small window with documentation without any trac navbar or edit buttons.
Also, this would allow to separate "Project Page" with project description wiki pages and "Developer Page" with all the power of trac.
Attachments (0)
Change History (9)
comment:1 by , 20 years ago
Owner: | changed from | to
---|---|
Severity: | normal → enhancement |
Status: | new → assigned |
comment:2 by , 20 years ago
I recently came across another Wiki system (was it MoinMoin?) that allows you to choose a template when creating a new wiki page.
I think that's good and the way it should be: while creating the initial revision of a page, one should be able to select the template to use (none by default).
Once a given XyzTemplate is chosen, an is-a relationship is created from the new page to that XyzTemplate page.
The template drop-down box is created out of all the available template pages (i.e. the all pages that have a is-a relationship to the TemplateTemplate page, plus the TemplateTemplate page itself for creating new templates).
comment:3 by , 19 years ago
Component: | general → wiki |
---|
comment:4 by , 18 years ago
Look like a duplicate of #962.
A patch to do this was applied in r3881 (in 0.11) (you can now use the PageTemplates/ prefix for a wiki page to specific a template).
comment:5 by , 18 years ago
Sorry, I think the confusion comes from my comments above, which mixed the original request with the idea of PageTemplates.
PageTemplates are effectively implemented for 0.11, but it's still not possible to specify an alternate display style for a given page.
comment:6 by , 18 years ago
Milestone: | → 2.0 |
---|---|
Owner: | removed |
Status: | assigned → new |
comment:8 by , 14 years ago
So back to the original topic, being able to have different styles of presentations for wiki pages.
Perhaps to relate with #3021 (see for example MediaWiki:Help:Namespaces#Identifying_namespaces).
See also #9248. If we have a first line going like #!wiki class=...
or #!div style="..."
this can also be used to have custom presentation styles. Note that this is already mostly possible with a toplevel #!div
blocks, but maybe it would be possible to go even further if we know the parameters apply to the whole content (like the new window trick suggested for Help:
pages).
comment:9 by , 14 years ago
Milestone: | triaging → next-major-0.1X |
---|---|
Priority: | normal → low |
I have similar wishes, but how to implement it?
One way would be to subclass the WikiModule, the other other would be more flexible, using is-a relations (relationships are not yet available on the trunk, but on the xref-branch).
In your example, you would prepare a ProjectPage which would be the template for all your project pages, E.g. if TestProject is-a ProjectPage, then it will be displayed according to what is specified in the ProjectPage:
The above syntax is not really pretty, of course.
While browsing the ProjectPage, there should be a form enabling the creation of a new Project…