cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
This question about Topic Markup Language and applications: Answered

Displaying form at beginning of the topic

I noticed that added forms appear at the end of the topic. However, our main user form has the form at the beginning and topic matter appears after. What is the solution to have the form at the beginning?

-- JoeMarandola - 28 Feb 2012

This is done in the view template for the users, PatternSkinUserViewTemplate (It might have changed in Foswiki 1.1.4. I'm basing this example on the version shipped in Foswiki 1.1.3).

There are two templates formattop and formatbottom Only one of which should expand the form template. The below example includes the default view template, and then overrides the form placement templates, inserting the form in formattop and removing it from formatbottom.

%TMPL:INCLUDE{"view"}%

%TMPL:DEF{"formattop"}%%TMPL:P{"form"}%%TMPL:END%

%TMPL:DEF{"formatbottom"}%%TMPL:END%

There are a number of ways to accomplish this on other topics. you could use any one of the following:
  • Define your own skin. Create MarandolaSkinViewTemplate topic, adjusting the form shown above. And override the skin with " Set SKIN = marandola,pattern"
  • Define your own view template - MarandolaViewTemplate, and apply to a web or individual topics with " Set VIEW_TEMPLATE = MarandolaView" (Note that the word Template is omitted)
Or you could apply it automatically based upon the attached form, using the AutoViewTemplatePlugin.

See PatternSkinCustomization for more details.

-- GeorgeClark - 29 Feb 2012

Thanks, George. Works like a charm.

-- JoeMarandola - 01 Mar 2012
 

QuestionForm edit

Subject Topic Markup Language and applications
Extension
Version Foswiki 1.1.4
Status Answered
Related Topics
Topic revision: r4 - 01 Mar 2012, JoeMarandola - This page was cached on 19 Sep 2018 - 22:57.

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