Tags:
create new tag
view all tags

Question

I feel the need for placing comments in template files (to explain for myself what the different lines do, but without this being rendered). Is this possible ?

Also, I would like the ability to save things in topic files that should not be rendered. Typicly " * set EDITBOXHEIGHT=30" on my home page. This is useful to have there, but not interesting for the viewers of the page.

I may have missed it in the documentation...

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: Only the standard ones
Server OS: Debian linux (unstable, a week old)
Web server: Apache current debian unstable package i guess
Perl version: 5.8.2
Client OS: Windows/linux++
Web Browser: IE/Konqueror

-- TWikiGuest - 26 Nov 2003

Answer

There is currently no official way to add comments to the skins without showing up in the HTML text returned to the browser.
<!-- You could use HTML comments, they will be hidden from the user unless she looks at the HTML source -->

You could add a new rule to your DefaultPlugin to filter out your own comments. Lets assume you define %REMARK{ any comment text here }% as your comment syntax. Add this to the commonTagsHandler:

    $_[0] =~ s/%REMARK{.*?}%//gos;

To hide the personal preferences settings you can enclose them in HTML comments, e.g.

<!--
__Personal Preferences (details in TWikiVariables)__
   * Horizontal size of text edit box: 
      * Set EDITBOXWIDTH = 70 
etc...
-->

-- PeterThoeny - 27 Nov 2003

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2003-11-27 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.