minor edit
[openafs-wiki.git] / TWiki / VarSTARTSECTION.mdwn
1 <a name="VarSTARTSECTION"></a>
2
3 ### <a name="STARTSECTION -- marks the start"></a><a name="STARTSECTION -- marks the start "></a> STARTSECTION -- marks the start of a section within a topic
4
5 - Section boundaries are defined with `%STARTSECTION{}%` and `%ENDSECTION{}%`.
6 - Sections may be given a name to help identify them, and/or a type, which changes how they are used.
7   - `type="section"` - the default, used for a generic section, such as a named section used by [[INCLUDE|Main/VarINCLUDE]].
8   - `type="include"` - like `%STARTINCLUDE%` ... `%STOPINCLUDE%` except that you can have as many include blocks as you want (`%STARTINCLUDE%` is restricted to only one).
9   - `type="templateonly"` - start position of text to be removed when a template topic is used. Use this to embed text that you _do not_ want expanded when a new topic based on the template topic is created. [[TWikiTemplates]] has more.
10   - `type="expandvariables"` - start position where [[TWikiVariables]] get expanded when a new topic is created. Normally only certain variables get expanded when a new topic based on the template topic is created. All variables get expanded within a `"expandvariables"` section. [[TWikiTemplates]] has more.
11 - Syntax: `%STARTSECTION{"name"}% ................... %ENDSECTION{"name"}%`
12 - Syntax: `%STARTSECTION{type="include"}% ........... %ENDSECTION{type="include"}%`
13 - Syntax: `%STARTSECTION{type="templateonly"}% ...... %ENDSECTION{type="templateonly"}%`
14 - Syntax: `%STARTSECTION{type="expandvariables"}% ... %ENDSECTION{type="expandvariables"}%`
15 - Supported parameters: <table border="1" cellpadding="0" cellspacing="0">
16   <tr>
17     <th bgcolor="#99CCCC"><strong> Parameter: </strong></th>
18     <th bgcolor="#99CCCC"><strong> Description: </strong></th>
19     <th bgcolor="#99CCCC"><strong> Default </strong></th>
20   </tr>
21   <tr>
22     <td><code>"name"</code></td>
23     <td> Name of the section. Must be unique inside a topic. </td>
24     <td> Generated name </td>
25   </tr>
26   <tr>
27     <td><code>type="..."</code></td>
28     <td> Type of the section; type <code>"section"</code>, <code>"include"</code>, <code>"templateonly"</code>, or <code>"expandvariables"</code></td>
29     <td><code>"section"</code></td>
30   </tr>
31 </table>
32 - **_%X% Note:_** If a section is not given a name, it will be assigned one. Unnamed sections are assigned names starting with `_SECTION0` for the first unnamed section in the topic, `_SECTION1` for the second, etc..
33 - **_%X% Note:_** You can define nested sections. Do not overlap sections. Use named sections to make sure that the correct START and ENDs are matched. Section markers are **not** displayed when a topic is viewed.
34 - Related: [[ENDSECTION|Main/VarENDSECTION]], [[INCLUDE|Main/VarINCLUDE]], [[NOP|Main/VarNOP]], [[STARTINCLUDE|Main/VarSTARTINCLUDE]], [[STOPINCLUDE|Main/VarSTOPINCLUDE]]