b r a y d e n . o r g / TWiki

/ WebHome / TWikiVariables / TWikiVariablesExamples

This Web


WebHome  
Topic List  
Web Statistics 

All Webs


Books
Main
Random
Software
TWiki  

brayden.org


Home
Monthly Digest
Today's Links
Resumé
Reading List
Books RSS
Random RSS
Software RSS

Other


Dale's Blog

currently-reading
TextDrive

TWikiVariables Examples

Bullet list showing topic name and summary

Write this:

%SEARCH{ "FAQ" scope="topic" web="TWiki" nosearch="on" nototal="on" header="   * *Topic: Summary:*" format="   * [[$web.$topic]]: $summary" }%

To get this:

NOTE: The most recent version of this FAQ is at TWiki:TWiki/TWikiFAQ.

Please ask support questions in the TWiki:Support web. The FAQs are here for frequently asked questions including answers.

... form elided ...

Other places where you can find answers to your questions:

TWikiDocumentation: All you need to know to install and configure TWiki TWikiTutorial: Get a jump start on using TWiki GoodStyle: Things to consider when changing text WikiSyntax, TextFormattingRules: A quick one-two guide to TWiki shorthand basics TextFormattingFAQ: Answers to frequently asked questions about text styling in TWiki If you can't find an answer, ask a question - post it in the TWiki:Support web

Back to: TWikiFAQ

-- TWikiGuest - 24 May 2012

The most frequently asked questions about text formatting are answered. Also, TextFormattingRules contains the complete TWiki shorthand system on one quick reference page.

Create a separator - a horizontal rule - by entering three dashes at the beginning of a blank line: = =

You can create six sizes of headings - h1...h6 in HTML - by typing, from the beginning of a line, three dashes - , from one to six plus signs + , a space, and your heading text. The FAQ questions on this page are created with: = You can insert a nested table of contents, generated from headings, by placing =

Table with form field values of topics with a form

Write this:

| *Topic:* | *OperatingSystem:* | *OsVersion:* |
%SEARCH{ "[T]opicClassification.*?value=\"[P]ublicFAQ\"" scope="text" regex="on" nosearch="on" nototal="on" format="| [[$topic]] | $formfield(OperatingSystem?) | $formfield(OsVersion?) |" }%

To get this: (simulated)

Topic: OperatingSystem: OsVersion:
IncorrectDllVersionW32PTH10DLL OsWin 95/98
WinDoze95Crash OsWin 95

Extract text from a topic using regular expressions

Write this:

%SEARCH{ "__Back to\:__ TWikiFAQ" scope="text" web="TWiki" regex="on" nosearch="on" nototal="on" header="TWiki FAQs:" format="   * $pattern(.*?FAQ\:[\n\r]*([^\n\r]+).*) [[$web.$topic][Answer...]]" }%

To get this:

TWiki FAQs:

Creating Custom Variables

Example: Create a custom logo variable
  • To place a logo anywhere in a web by typing %MYLOGO%, simply define the variable on the web's WebPreferences page. You also have to upload logo.gif - this can be done by attaching a file to LogoTopic (any topic name you choose):
    • Set MYLOGO = %PUBURL%/%MAINWEB%/LogoTopic/logo.gif

-- MikeMannix? - 23 Nov 2001

 
 
Current Rev: r1.1 - 05 Aug 2003 - 05:48 GMT - DaleBrayden, Revision History:Diffs | r1.1
© 2003-2011 by the contributing authors.