PreviewTop
(redirected from StefCTDemo.RandomCookbookPage)
(:redirect PreviewFirst:)
Question
By default, PmWiki's edit form places the page preview beneath the edit box. How can I move it to be at the top instead?
Answer
Add the following code to a local customization file:
$HandleEditFmt= array(&$PageStartFmt, &$PagePreviewFmt,&$PageEditFmt,&$PageEndFmt);
Discussion
This statement simply switches the order of the $PagePreviewFmt and $PageEditFmt variables from their default, to cause the page preview to appear first. This Cookbook page has this customization set, thus while editing this page any edit preview will appear at the top instead of the bottom (see PreviewTop?action=edit&preview=y).
If you want to display the edit quick reference as well, use
$HandleEditFmt= array(&$PageStartFmt, &$PagePreviewFmt, &$PageEditFmt,'wiki:PmWiki.EditQuickReference', &$PageEndFmt);
instead of the above code.
--thom
Idea for alternative behaviour
What if pressing the 'Preview'-button would leave the resulting edit-window scrolled to the top of the previewd part? (Rather than seeing the code). /Christian
Contributors
- Pm, Jun-06-2004
This seems to be broken or perhaps the customization is not set anymore? -- Balu
Fixed now -- I apparently deleted the customization at some point in the past. --Pm
Looks like you did again :) Balu
Fixed again :) --Pm
User notes : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.