0

I have a FOSWiki installation with a bunch of Topic templates already defined. the problem is, when a user selects the topic, they are presented with a bunch of extra information that they should not edit, and should not even see really. Is there a way to hide this content in the WYSWYG editor?

Example: The topic template looks like this:

<!--
   * Foswiki.GenPDFAddOn Settings
      * Set GENPDFADDON_TITLE =  <font size="7"><center>Foo</center></font>
      * Set GENPDFADDON_HEADFOOTFONT = helvetica
      * Set GENPDFADDON_FORMAT = pdf14
      * Set GENPDFADDON_PERMISSIONS = print,no-copy
      * Set GENPDFADDON_ORIENTATION = portrait
      * Set GENPDFADDON_PAGESIZE = letter
      * Set GENPDFADDON_TOCLEVELS = 0
      * Set GENPDFADDON_HEADERSHIFT = 0
-->

<!-- PDFSTART -->

<!-- HEADER LEFT "Foo:Bar" -->

<!-- HEADER RIGHT "%BASETOPIC%" -->

<!-- HEADER CENTER " " -->

<!-- FOOTER RIGHT "Doc Rev %REVINFO{"r$rev - $date " web="%WEB%" topic="%BASETOPIC%"}%" -->

<!-- FOOTER LEFT "F-xxx Rev A" -->

<!-- FOOTER CENTER "Page $PAGE(1)" -->


Header 1

foo

etc. etc. etc

<!-- pdfstop -->

And when the user selects the topic template, they get all that in the WYSWYG editor. I would like to hide all that so when the user selects the topic template, they get

Header 1

foo

etc etc etc 

Without any of the other mark-up.

Mica
  • 123
  • 6

1 Answers1

0

mmm,

I'd separate things out so that the non-user editable bits are either not in the topic at all (good for settings that are shared across topics), or move them into META:PREFERENCES.

all the Set lines you have can be put into the Meta section of the topic (like DataForms) see Edit topic preference settings in the More topic actions.

I think you should be able to move the PDF markup bits out into a common view template - either in the foswiki/templates dir, or as a ViewTemplate topic - see some docco at http://foswiki.org/System/SkinTemplates

SvenDowideit
  • 161
  • 2