Uploaded image for project: 'JSPWiki'
  1. JSPWiki
  2. JSPWIKI-567

Start Creating New Page with clone from Template page with Variables

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.8.2, 3.0
    • None
    • Editors
    • None

    Description

      Need:
      Make end user easier to create consistent wiki pages with template page with variables.
      Current clone feature of Edit does not support variables in template page.

      Here is patch to add optional variable expansion to clone feature.

      After you add expand=true to Edit.jsp url, variables in template file is expanded. The syntax is {$variablename}.
      You can use default JSPWiki variables like {$pagename} or you can add your own extra variable appending new ones to url.

      Example:
      Edit.jsp with variables expanded in new clone page:
      Edit.jsp?page=Notes%20Db%20View%20times&clone=DefaultNote&expand=true&backpage=Db%20View%20times

      Utilization in existing page:
      [

      {InsertPage page='Notes Db View times'}

      ,default=
      'Auto-generated page. Add description and comments to page <a href="Edit.jsp?page=Notes Db View times&clone=DefaultNote&expand=true&backpage=Db View times"\>Notes Db View times</a>'}]

      Content of page file Defaultnote.txt:
      ![{$backpage}]
      [Edit:{$pagename}]

      Attachments

        1. JSPWIKI-567-clone-patch.txt
          2 kB
          Jukka Karvanen

        Activity

          People

            Unassigned Unassigned
            jukkakar Jukka Karvanen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: