Tags:
create new tag
, view all tags

Question

I'm trying to add a web preference variables
* V = < verbatim>
* E - < /verbatim>

(yes I use 3 spaces before the *, and no space after the html open bracket) I add this to the topic Main Web > WebPreferences

I then save the topic. I expected that now I could use the %V% and %E% in other MainWeb topics, but it does not work.

Also, the <verbatim> seems to take affect on the WebPreference page.

How do I make an html tag into a variable?

The documentation is very confusing. It is not clear if I need to edit the topic in order to customize or do something else. If I edit, it does not do what I expect.

Environment

TWiki version: TWikiRelease04x00x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: SLES9 kernel 2.6.5.7-97
Web server: Apache
Perl version: 5
Client OS: any
Web Browser: any
Categories: Documentation

-- DanBarDov - 16 Apr 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

The <pre> and <verbatim> tags are handled specially in TWiki, e.g. you cannot put them in preferences variables. Any other HTML tag should be OK. Silly example:

  • Set STARTBOLD =
  • Set ENDBOLD =

This is bold text.

-- PeterThoeny - 16 Apr 2006

So any idea of some other HTML tag that would give me what verbatim gives? (my bad luck that my first preference is a special case huh?)

-- DanBarDov - 17 Apr 2006

<style>
div.fragment{
        background: #FFFFCC;
        border: 1px solid #CCCCCC;
        margin-left: 2em;
        margin-right: 2em;
        padding: 4px;
}
</style>
<!--
   * Set CODE = <div class="fragment">
   * Set ENDCODE = </div>
-->

this works pretty well except for the fact that linebreaks aren't respected; anyone know how to do that in CSS?

a span tag might be more appropriate, depending on your use case.

-- WillNorris - 17 Apr 2006

 
Topic revision: r5 - 2007-10-23 - JonathanDorling
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.