blob: 7842e4f32487b3fcf8a70605edbf6baea282227d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<com:TContent ID="body" >
<h1>Page Configurations</h1>
<p>
Page configurations are mainly used by <code>TPageService</code> to modify or append the application configuration. As the name indicates, a page configuration is associated with a directory storing some page files. It is stored as an XML file named <code>config.xml</code>.
</p>
<p>
When a user requests a page stored under <code><BasePath>/dir1/dir2</code>, the <code>TPageService</code> will try to parse and load <code>config.xml</code> files under <code><BasePath>/dir1</code> and <code><BasePath>/dir1/dir2</code>. Paths, modules, and parameters specified in these configuration files will be appended or merged into the existing application configuration.
</p>
<p>
The format of a page configuration file is as follows,
<pre class="source">
<configuration>
<paths>
<alias id="AliasID" path="AliasPath" />
<using namespace="Namespace" />
</paths>
<modules>
<module id="ModuleID" class="ModuleClass" PropertyName="PropertyValue" ... />
</modules>
<authorization>
<allow pages="PageID1,PageID2" users="User1,User2" roles="Role1,Role2" verb="post" />
<deny pages="PageID1,PageID2" users="User1,User2" roles="Role1,Role2" verb="post" />
</authorization>
<pages PropertyName="PropertyValue" ...>
<page id="PageID" PropertyName="PropertyValue" ... />
</pages>
<parameters>
<parameter id="ParameterID" class="ParameterClass" PropertyName="PropertyValue" ... />
</parameters>
</configuration>
</pre>
The <code><paths></code>, <code><modules></code> and <code><parameters></code> are similar to those in an application configuration. The <code><authorization></code> specifies the authorization rules that apply to the current page directory and all its subdirectories. It will be explained in more detail in future sections. The <code><pages></code> element specifies the initial values for the properties of pages. Each <code><page></code> element specifies the initial property values for a particular page identified by the <code>id</code attribute. Initial property values given in the <code><pages></code> element apply to all pages in the current directory and all its subdirectories.
</p>
</com:TContent>
|