r8 - 06 Mar 2008 - 01:20:59 - PeterThoenyYou are here: TWiki >  TWiki Web > HowToMoveTheFormToTheTopOfThePage
Tags:
, create new tag
ALERT! NOTE: This is a SupplementalDocument topic which is not included with the official TWiki distribution. Please help maintain high quality documentation by fixing any errors or incomplete content. Put questions and suggestions concerning the documentation of this topic in the comments section below! Use the Support web for problems you are having using TWiki.

FAQ:

How do I move the form to the top of the page?

Answer:

There are several different ways to implement this change.

Globally via Skin Template

The easiest way to do this is to define a new TWiki skin that has the form before the text, instead of after it. The easiest way to define a new skin is to derive your new skin from an existing skin. In the following we will derive a new skin topform from the pattern skin. This is specific to TWiki 4.0 and later.

For information on how to create a custom template, read PatternSkinCustomization first.

Pattern skin has 2 buckets for the form: formattop (form-at-the-top) and formatbottom (form-at-the-bottom):

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

You simply swap the bucket contents. Using either a template or a topic template, write in your custom template:

%TMPL:INCLUDE{"view"}%
%TMPL:DEF{"formattop"}%%TMPL:P{"form"}%%TMPL:END%
%TMPL:DEF{"formatbottom"}%%TMPL:END%

Alternative: No Server-side customization needed

User Pages

You can modify the look of the TWIki user pages (in the Main web) without editing the back-end template files. Change Main.PatternSkinUserViewTemplate or Main.UserViewTemplate. See Support.HowToMoveUserFormBox for details.

Other Pages

Make a page, Main.TopFormViewTemplate, that contains the following code:

%TMPL:INCLUDE{"view"}%

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

To use, add the following to any other page

<!--
   * Set VIEW_TEMPLATE = Main.TopFormViewTemplate
-->

Alternatively, to have the setting out of the way, you can define the bullet in the topic preferences (follow the "Edit topic preference settings" link in the "More topic actions" screen.)

Back to: TWikiFAQ

-- Contributors: CrawfordCurrie, PeterThoeny, ArthurClemens, VickiBrown



Comments & Questions about this Supplemental Document Topic

I escaped the SKIN setting, converted the topic to the actual FAQ format so that TWikiFAQ can pick it up, and added the standard SupplementalDocument header and footer.

-- PeterThoeny - 23 Feb 2006

Thanks Peter. Any chance we can get these formats documented somewhere; or even better, a TWikiApplication for adding such FAQs? At the moment they are splattered over TWiki, Codev and Support webs, and I always have trouble knowing where to move them.

-- CrawfordCurrie - 12 Mar 2006

When you create a new FAQ at TWikiFAQ it should have the proper format. Actually, it was missing the SupplementalDocument header and footer, which I added.

-- PeterThoeny - 12 Mar 2006

I have updated the FAQ text with the latest pattern skin documentation.

-- ArthurClemens - 15 Apr 2007

 
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r8 < r7 < r6 < r5 < r4 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo