Changeset 521 for trunk/core/data/TWiki
- Timestamp:
- 11/10/08 13:51:35 (4 years ago)
- Location:
- trunk/core/data/TWiki
- Files:
-
- 7 edited
- 1 moved
-
InstantEnhancements.txt (modified) (2 diffs)
-
MainFeatures.txt (modified) (1 diff)
-
SkinTemplates.txt (moved) (moved from trunk/core/data/TWiki/PresentationTemplates.txt) (5 diffs)
-
TWikiDocumentation.txt (modified) (1 diff)
-
TWikiGlossary.txt (modified) (1 diff)
-
TWikiJavascripts.txt (modified) (1 diff)
-
TWikiReferenceManual.txt (modified) (1 diff)
-
TWikiSkins.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/data/TWiki/InstantEnhancements.txt
r490 r521 36 36 ---+++ Set Page Background Color 37 37 38 Without getting into the [[ presentation templates]] system yet, you can easily edit the ==view.tmpl== (in the =templates= directory). In the HTML at the top, the body tag has the page background hardcoded to white ==bgcolor="#ffffff"==. You can change that color value to new variable. First, define a new preferences variable in the site-level [[%LOCALSITEPREFS%]], e.g. =* Set =PAGEBGCOLOR = #d0d0d0=, then edit the ==view.tmpl== template file and change ==bgcolor="#ffffff"== to ==bgcolor="%<nop>PAGEBGCOLOR%"==. If you want, you can set the page background color individually per web, simple add a =* Set =PAGEBGCOLOR = #d0d0d0= bullet to the WebPreferences to overload the site-level preferences. (Without font color control, you'll have to stick to light colors.)38 Without getting into the [[skin templates]] system yet, you can easily edit the ==view.tmpl== (in the =templates= directory). In the HTML at the top, the body tag has the page background hardcoded to white ==bgcolor="#ffffff"==. You can change that color value to new variable. First, define a new preferences variable in the site-level [[%LOCALSITEPREFS%]], e.g. =* Set =PAGEBGCOLOR = #d0d0d0=, then edit the ==view.tmpl== template file and change ==bgcolor="#ffffff"== to ==bgcolor="%<nop>PAGEBGCOLOR%"==. If you want, you can set the page background color individually per web, simple add a =* Set =PAGEBGCOLOR = #d0d0d0= bullet to the WebPreferences to overload the site-level preferences. (Without font color control, you'll have to stick to light colors.) 39 39 40 40 ---+++ Titles-Only Topic List - !WebTopicList … … 174 174 ---++ Add Your Favorite <nop>JavaScript Features 175 175 176 You're no doubt familiar or better with HTML, JS, and "webmastering". Without getting into the [[ presentation templates]] system yet, you can easily edit the ==view.pattern.tmpl== (if you are using default pattern skin) (in the =templates= directory) for some dramatic effects. The top of the template is mostly regular HTML with some variables. Open up some space in the ==<head>== area, and you can drop in reliable <nop>JavaScripts - a pop-up window script, for example - or tag it as an external script.176 You're no doubt familiar or better with HTML, JS, and "webmastering". Without getting into the [[skin templates]] system yet, you can easily edit the ==view.pattern.tmpl== (if you are using default pattern skin) (in the =templates= directory) for some dramatic effects. The top of the template is mostly regular HTML with some variables. Open up some space in the ==<head>== area, and you can drop in reliable <nop>JavaScripts - a pop-up window script, for example - or tag it as an external script. 177 177 178 178 * %T% Obviously, you can do the same - place a link to an external stylesheet as well. If you set values for standard HTML tags, you can control a good deal of the type size, style and color with out adding CSS tags. __example__ -
trunk/core/data/TWiki/MainFeatures.txt
r495 r521 15 15 * *Variables:* Use [[TWikiVariables][variables]] to dynamically compose your pages. This allows you for example to dynamically build a table of contents, include other pages, or show a search result embedded in a page. 16 16 * *TWiki plugins:* Easily install program enhancements using external [[TWikiPlugins][plug-in modules]]. Developers can create plug-ins in Perl using the TWiki Plugin API. 17 * *Templates and skins:* A flexible [[ PresentationTemplates][templating system]] separates program logic and presentation. [[Skins]] overwrite template headers and footers; page content is unaffected.17 * *Templates and skins:* A flexible [[SkinTemplates][templating system]] separates program logic and presentation. [[Skins]] overwrite template headers and footers; page content is unaffected. 18 18 * *Managing pages:* Individual pages can be renamed, moved and deleted through the browser. 19 19 * *Managing users:* Web-based [[TWikiRegistration][user registration]] and [[ChangePassword][change of password]]. -
trunk/core/data/TWiki/SkinTemplates.txt
r484 r521 1 1 %META:TOPICINFO{author="ProjectContributor" date="1111931141" format="1.0" version="$Rev: 15508 $"}% 2 2 %STARTINCLUDE% 3 ---+ Presentation Templates3 ---+ Skin Templates 4 4 5 5 _Definition of the templates used to render output_ … … 9 9 ---++ Overview 10 10 11 _ Presentation Templates_ are plain text with embedded _template macros_ that describe11 _Skin Templates_ are plain text with embedded _template macros_ that describe 12 12 how to compose blocks of text together, to create something new. 13 13 14 14 #HtmlTemplates 15 Presentation templates are used composing the output from all actions, like view, edit, and preview.15 Skin templates are used composing the output from all actions, like view, edit, and preview. 16 16 This allows you to change the look and feel of all pages by editing just a few template files. 17 17 18 Presentation templates are also used in the definition of [[Skins]]. 19 20 Presentation templates are usually stored as text files with the extension 18 Skin templates are usually stored as text files with the extension 21 19 =.tmpl=, though can also come from topic text in some limited circumstances. 22 20 They are usually HTML with embedded _template macros_. … … 34 32 * ==%<nop>{...}%==: is a comment. 35 33 * Two-pass processing lets you use a variable before or after declaring it. 36 * PresentationTemplates and [[Skins]] work transparently and interchangeably. For example, you can create a skin that overloads only the =twiki.tmpl= master presentation template, like =twiki.print.tmpl=, that redefines the header and footer.34 * For example, you can create a skin that overloads only the =twiki.tmpl= master skin template, like =twiki.print.tmpl=, that redefines the header and footer. 37 35 * %H% Use of template macros is optional: templates work without them. 38 36 * %X% *NOTE:* Most template macros work only for templates: they do not get processed in normal topic text. The one exception is =%TMPL:P=. … … 56 54 See IfStatements for details of supported context identifiers. 57 55 58 ---+++ Finding Presentation Templates56 ---+++ Finding Skin Templates 59 57 60 The presentation templates shipped with a release are stored in the twiki/templates directory.61 As an example, ==twiki/templates/view.tmpl== is the default presentation template file for the ==twiki/bin/view== script.58 The skin templates shipped with a release are stored in the twiki/templates directory. 59 As an example, ==twiki/templates/view.tmpl== is the default skin template file for the ==twiki/bin/view== script. 62 60 63 61 You can save templates in other directories as long as they are listed in the ={TemplatePath}= configuration setting. 64 62 The ={TemplatePath}= is defined in the Miscellaneous section of the [[%SCRIPTURLPATH{configure}%][configure]] page. 65 63 66 You can also save presentation templates in user topics (_IF_ there is no possible template match in the =templates= directory).64 You can also save skin templates in user topics (_IF_ there is no possible template match in the =templates= directory). 67 65 The ={TemplatePath}= configuration setting defines which topics will be accepted as templates. 68 66 69 Presentation Templates that are included with an explicit ='.tmpl'= extension are looked for only in the =templates/= directory.67 Skin templates that are included with an explicit ='.tmpl'= extension are looked for only in the =templates/= directory. 70 68 For instance =%TMPL:INCLUDE{"example.tmpl"}%= will only return =templates/example.tmpl=, regardless of ={TemplatePath}= and SKIN settings. 71 69 … … 106 104 I. =%SYSTEMWEB%.ExampleTemplate= 107 105 108 Template names are usually derived from the name of the currently executing script; however it is also possible to override these settings in the =view= and =edit= scripts, for example when a topic-specific template is required. Two preference variables can be used to override the presentation templates used:106 Template names are usually derived from the name of the currently executing script; however it is also possible to override these settings in the =view= and =edit= scripts, for example when a topic-specific template is required. Two preference variables can be used to override the skin templates used: 109 107 * =VIEW_TEMPLATE= sets the template to be used for viewing a topic 110 108 * =EDIT_TEMPLATE= sets the template for editing a topic. -
trunk/core/data/TWiki/TWikiDocumentation.txt
r518 r521 63 63 [[#PageTop][Back to top]] 64 64 ------ 65 %INCLUDE{" PresentationTemplates"}%65 %INCLUDE{"SkinTemplates"}% 66 66 67 67 [[#PageTop][Back to top]] -
trunk/core/data/TWiki/TWikiGlossary.txt
r495 r521 15 15 | Site: | A TWiki installation consisting of one or more _webs_. [[TWikiSite][Details...]] | 16 16 | Skin: | Skins overlay regular _templates_ with alternate header/footer layout of _pages_; topic text is not affected. Skins are typically enabled site-wide or per _web_. [[TWikiSkins][Details...]] | 17 | Templates: | (1) Regular templates define header/footer layout of _pages_; topic text is not affected. (2) Template topics set the default content for new _topics_. [[ PresentationTemplates][Details...]] |17 | Templates: | (1) Regular templates define header/footer layout of _pages_; topic text is not affected. (2) Template topics set the default content for new _topics_. [[SkinTemplates][Details...]] | 18 18 | Topic: | The content of a TWiki _page_, consisting of text, an optional _form_ and optional _attachments_. It has a WikiName that's unique within its _web_. [[TopicsAndWebs][Details...]] | 19 19 | TWiki: | A web-based collaboration platform targeting the corporate world. Contraction of "TakeFive Wiki". By chance, also happens to be the name of the AI robot star of the Buck Rogers 1979 movie and TV series. Features include browser based editing, automatic linking of text (based on ideas of the original <nop>WikiWikiWeb), revision control, file _attachments_, _form_ handling, _preferences_ settings, access control and more. [[http://TWiki.org/][Details...]] | -
trunk/core/data/TWiki/TWikiJavascripts.txt
r485 r521 1 1 ---+ Javascripts 2 2 3 This topic contains javascript files that are included by presentation templates, and may be used by skin templates and in topics.3 This topic contains javascript files that are included by skin templates, and may be used by skin templates and in topics. 4 4 5 __Related Topics:__ PresentationTemplates, [[Skins]]5 __Related Topics:__ SkinTemplates, [[Skins]] 6 6 7 7 * Set ALLOWTOPICCHANGE = %USERSWEB%.AdminGroup -
trunk/core/data/TWiki/TWikiReferenceManual.txt
r518 r521 20 20 1. [[FileAttachment][File Attachment]] 21 21 1. [[TWikiForms][TWiki Forms]] 22 1. [[ Presentation Templates]]22 1. [[Skin Templates]] 23 23 1. [[TWikiSkins][TWiki Skins (visual layout)]] 24 24 1. [[MetaData]] -
trunk/core/data/TWiki/TWikiSkins.txt
r490 r521 9 9 ---++ Overview 10 10 11 TWiki uses [[ presentation templates]] as the basis of all the screens it uses to interact with users. Each screen has an associated template file that contains the basic layout of the screen. This is then filled in by the code to generate what you see in the browser.11 TWiki uses [[skin templates]] as the basis of all the screens it uses to interact with users. Each screen has an associated template file that contains the basic layout of the screen. This is then filled in by the code to generate what you see in the browser. 12 12 13 13 TWiki ships with a default set of template files that give a very basic, CSS-themable, look-and-feel. TWiki also includes support for _skins_ that can be selected to give different, more sophisticated, look and feels. A default TWiki installation will usually start up with the PatternSkin already selected. Skins may also be defined by third parties and loaded into a TWiki installation to give more options. To see how TWiki looks when *no* skin is selected, [[%SCRIPTURL{"view"}%/%WEB%/%TOPIC%?skin=not_a_skin][view this topic with a non-existant skin]]. … … 32 32 You may want to define your own skin, for example to comply with corporate web guidelines, or because you have a aesthetic vision that you want to share. There are a couple of places you an start doing this. 33 33 34 The [[ presentation templates]] used for skins are located in the =twiki/templates= directory and are named according to the skin: ==<scriptname>.<skin>.tmpl==. Skin files may also be defined in TWiki topics - see PresentationTemplates for details.35 36 To start creating a new skin, copy the default presentation templates (like =view.tmpl=), or copy an existing skin to use as a base for your own skin. You should only need to copy the files you intend to customise, as TWiki can be configured to fall back to another skin if a template is not defined in your skin. Name the files as described above (for example =view.myskin.tmpl=.34 The [[skin templates]] used for skins are located in the =twiki/templates= directory and are named according to the skin: ==<scriptname>.<skin>.tmpl==. Skin files may also be defined in TWiki topics - see SkinTemplates for details. 35 36 To start creating a new skin, copy the default skin templates (like =view.tmpl=), or copy an existing skin to use as a base for your own skin. You should only need to copy the files you intend to customise, as TWiki can be configured to fall back to another skin if a template is not defined in your skin. Name the files as described above (for example =view.myskin.tmpl=. 37 37 38 38 If you use PatternSkin as your starting point, and you want to modify the layout, colors or even the templates to suit your own needs, have a look first at the topics PatternSkinCustomization and PatternSkinCssCookbook. … … 182 182 Controlling the look and feel of attachment tables is a little bit more complex than for the rest of a skin. By default, the attachment table is a standard TWiki table, and the look is controlled in the same way as other tables. In a very few cases you may want to change the _content_ of the table as well. 183 183 184 The format of standard attachment tables is defined through the use of special _TWiki template macros_ which by default, are defined in the =attachtables.tmpl= template using the =%TMPL:DEF= macro syntax described in PresentationTemplates. These macros are:184 The format of standard attachment tables is defined through the use of special _TWiki template macros_ which by default, are defined in the =attachtables.tmpl= template using the =%TMPL:DEF= macro syntax described in SkinTemplates. These macros are: 185 185 | *Macro* | *Description* | 186 186 | =ATTACH:files:header= | Standard title bar | … … 221 221 TWiki uses a _skin search path_, which lets you combine skins additively. The skin path is defined using a combination of TWikiVariables and URL parameters. 222 222 223 TWiki works by asking for a template for a particular function - for example, 'view'. The detail of how templates are searched for is described in PresentationTemplates, but in summary, the templates directory is searched for a file called <code>view.</code><i>skin</i><code>.tmpl</code>, where _skin_ is the name of the skin e.g. =pattern=. If no template is found, then the fallback is to use =view.tmpl=. Each skin on the path is searched for in turn. For example, if you have set the skin path to =local,pattern= then =view.local.tmpl= will be searched for first, then =view.pattern.tmpl= and finally =view.tmpl=.223 TWiki works by asking for a template for a particular function - for example, 'view'. The detail of how templates are searched for is described in SkinTemplates, but in summary, the templates directory is searched for a file called <code>view.</code><i>skin</i><code>.tmpl</code>, where _skin_ is the name of the skin e.g. =pattern=. If no template is found, then the fallback is to use =view.tmpl=. Each skin on the path is searched for in turn. For example, if you have set the skin path to =local,pattern= then =view.local.tmpl= will be searched for first, then =view.pattern.tmpl= and finally =view.tmpl=. 224 224 225 225 The basic skin is defined by a =SKIN= setting:
Note: See TracChangeset
for help on using the changeset viewer.
