Edgewall Software
Modify

Opened 20 years ago

Last modified 14 years ago

#1376 new enhancement

Alternate Template for wiki pages

Reported by: amasiar@… 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 Christian Boos, 20 years ago

Owner: changed from Jonas Borgström to Christian Boos
Severity: normalenhancement
Status: newassigned

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:

use_template: ProjectPage/ClearSilver
new_window: true
initial_content: Describe your project here

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…

comment:2 by Christian Boos, 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 Christopher Lenz, 19 years ago

Component: generalwiki

comment:4 by sid, 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 Christian Boos, 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 Christian Boos, 18 years ago

Milestone: 2.0
Owner: Christian Boos removed
Status: assignednew

comment:7 by Christian Boos, 15 years ago

Milestone: 2.0unscheduled

Milestone 2.0 deleted

comment:8 by Christian Boos, 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 Christian Boos, 14 years ago

Milestone: triagingnext-major-0.1X
Priority: normallow

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.