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 someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is 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

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2007-10-23 - JonathanDorling
 
  • 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.