This question about Documentation: Answered

How to place a Form above the Text Area when editing

The documentation describes how to change the layout for viewing: System.PatternSkinCustomization#I_want_to_place_the_form_at_the - although I have given a clearer example below.

However, this does not change the layout for editing, which is potentially more important when using forms.

I am unable to edit the documentation, so have given this example here for others.

Answer

If using the pattern skin (default), create your own skin template file for editing: e.g. copy the foswiki/templates/edit.pattern.tmpl to foswiki/templates/edit.myskin.tmpl (where foswiki is the base directory as specified in your configure page).

Edit the bottom of the newly created edit.myskin.tmpl file to appear as follows:

%TMPL:DEF{"content"}%%TMPL:P{"formstart"}%%TMPL:P{"formtop"}%
%TMPL:P{"toolbar"}%
%TMPL:P{"pagehelp"}%
%TMPL:P{"formbottom"}%%TMPL:P{"topicinfo"}%
%TMPL:P{"textarea"}%
%TMPL:P{"formend"}%
%TMPL:P{"pagehelp_nojavascript"}%%TMPL:END%

Essentially, the "textarea" line has been moved to the 3rd from bottom line, making it appear at the bottom of the page when editing any page with a form.

In order to use this new skin, enable it for a single Web or across the whole wiki in the relevant WebPreferences or SitePreferences by adding the line (as described in System.PatternSkinCustomization#The_template_approach):

   * Set SKIN = myskin,pattern

Example of placing Form above Text Area in View mode

Again, to demonstrate using the default pattern skin, create your own skin template file by copying foswikiview/templates/view.pattern.tmpl to foswiki/templates/view.myskin.tmpl

Edit the newly created file view.myskin.tmpl on lines 17 and 18 as follows:
%TMPL:DEF{"formattop"}%%TMPL:P{"form"}%%TMPL:END%
%TMPL:DEF{"formatbottom"}%%TMPL:END%

Lines 15 and 16 mention that this setting is deprecated. However, this still appears to carry the "form" setting described in System.PatternSkinCustomization#I_want_to_place_the_form_at_the.

Enable myskin for the webs or site you want as above.

-- Ugm6Hr - 23 Aug 2009

QuestionForm edit

Subject Documentation
Extension
Version Foswiki 1.0.6
Status Answered
Topic revision: r1 - 23 Aug 2009, Ugm6Hr
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy