Project

General

Profile

Actions

Patch #3806

open

Template engine

Added by Dmitry Chernyak about 15 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Wiki
Target version:
-
Start date:
2009-09-02
Due date:
% Done:

0%

Estimated time:

Description

I just wrote the simple template engine:
You must create a project with id "templates".
Next, when you'll create the new wiki page, if page with such name can be found in templates/wiki, it will be used as template.

I using it to write SLA for projects.

The changes is in the
lib/redmine/wiki_formatting/textile/helper.rb
(one function)

        def initial_page_content(page)
          @wtempl = Project.find("templates")
          pname = "#{@page.pretty_title}" 
          @templ = @wtempl.wiki.find_or_new_page(pname)
          if @templ.new_record?
          then
            "h1. #{@page.pretty_title}" 
          else
            @templ.content.text
          end
        end


Related issues

Related to Redmine - Feature #2674: wiki templatesNew2009-02-05

Actions
Related to Redmine - Feature #6989: Wiki template for version wiki pagesNew2010-11-26

Actions
Actions

Also available in: Atom PDF