Syncing Foundry files
git-svn-id: https://svn.libreccm.org/ccm/trunk@2899 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
d337647696
commit
6f89ff9d92
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<css-files>
|
||||||
|
</css-files>
|
||||||
|
|
@ -8,6 +8,14 @@
|
||||||
</applications>
|
</applications>
|
||||||
|
|
||||||
<content-items>
|
<content-items>
|
||||||
<default>content-items/default.xml</default>
|
<detail>
|
||||||
|
<content-item content-type="com.arsdigita.cms.contenttypes.Article">
|
||||||
|
content-items/article-detail.xml
|
||||||
|
</content-item>
|
||||||
|
<default>content-items/detail-default.xml</default>
|
||||||
|
</detail>
|
||||||
|
<list>
|
||||||
|
<default>content-items/list-default.xml</default>
|
||||||
|
</list>
|
||||||
</content-items>
|
</content-items>
|
||||||
</template>
|
</templates>
|
||||||
|
|
@ -1672,12 +1672,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The entry point for creating Foundry documentation.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2260,7 +2254,7 @@
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
A message string of the for <code>[Foundry $level] $message</code> with
|
A message string of the form <code>[Foundry $level] $message</code> with
|
||||||
<code>$level</code> and <code>$message</code> replaced by the values of the
|
<code>$level</code> and <code>$message</code> replaced by the values of the
|
||||||
parameters.
|
parameters.
|
||||||
|
|
||||||
|
|
@ -2363,7 +2357,7 @@
|
||||||
<h3>Result type</h3>
|
<h3>Result type</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
any
|
xs:string
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -2371,6 +2365,11 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
A message string of the form <code>[Foundry INFO] $message</code> with
|
||||||
|
<code>$message</code> replaced by the value of the parameter.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -2471,7 +2470,7 @@
|
||||||
<h3>Result type</h3>
|
<h3>Result type</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
any
|
xs:string
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -2479,6 +2478,11 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
A message string of the form <code>[Foundry WARNING] $message</code> with
|
||||||
|
<code>$message</code> replaced by the value of the parameter.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -2490,73 +2494,590 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section id="foundry:message-error" class="function">
|
||||||
|
|
||||||
The message text.
|
<h1>
|
||||||
|
Function foundry:message-error
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<foundry:doc-desc xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Helper function to generate an info message. This function be used together with
|
||||||
|
<code><xsl:message></code> to output a message in the CCM log when
|
||||||
|
something goes wrong in the theme, for example when a layout file has a wrong
|
||||||
|
structure. Example:
|
||||||
|
|
||||||
|
</p>
|
||||||
|
<pre>
|
||||||
|
...
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:message select="foundry:message-info('Some error has occurred...')" />
|
||||||
|
</xsl:message>
|
||||||
|
...
|
||||||
|
</pre>
|
||||||
|
</foundry:doc-desc>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Parameters</h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<th>Name</th>
|
||||||
|
|
||||||
|
<th>Mandatory</th>
|
||||||
|
|
||||||
|
<th>Type</th>
|
||||||
|
|
||||||
|
<th>Description</th>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
message
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
yes
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
any
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<h2>Result</h2>
|
||||||
|
|
||||||
|
<h3>Result type</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
xs:string
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
A message string of the form <code>[Foundry ERROR] $message</code> with
|
||||||
|
<code>$message</code> replaced by the value of the parameter.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Helper function to generate an info message. This function be used together with
|
</section>
|
||||||
<xsl:message> to output a message in the CCM log when
|
|
||||||
something goes wrong in the theme, for example when a layout file has a wrong
|
|
||||||
structure. Example:
|
|
||||||
|
|
||||||
|
|
||||||
...
|
<section id="foundry:get-attribute-value" class="function">
|
||||||
<xsl:message>
|
|
||||||
<xsl:message select="foundry:message-info('Some error has occurred...')" />
|
<h1>
|
||||||
</xsl:message>
|
Function foundry:get-attribute-value
|
||||||
...
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<foundry:doc-desc xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
A helper function for retrieving an attribute value from an element. If the
|
||||||
|
attribute is set on the current element the value of the attribute is used as
|
||||||
|
result. If the attribute is not set the <code>default-value</code> is used. This
|
||||||
|
method is used by several layout tags with optional attributes. A common use pattern
|
||||||
|
looks like this:
|
||||||
|
|
||||||
|
</p>
|
||||||
|
<pre>
|
||||||
|
<xsl:template match="example">
|
||||||
|
<xsl:variable name="width"
|
||||||
|
select="foundry:get-attribute-value(current(), 'width', '640')" />
|
||||||
|
<xsl:variable name="height"
|
||||||
|
select="foundry:get-attribute-value(current(), 'height', '480')" />
|
||||||
|
/<xsl:template>
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
In this example, the element <code>example</code> has two optional attributes:
|
||||||
|
<code>with</code> and <code>height</code>. If the attribute is set in processed XML,
|
||||||
|
the value set there is used. Otherwise the default value (<code>640</code>
|
||||||
|
respectively <code>480</code>) is used. Without this function a code block like the
|
||||||
|
one in the <code>xsl:choose</code> block of this function would be necessary for
|
||||||
|
each of the variables.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</foundry:doc-desc>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#foundry-message-info
|
<h2>Parameters</h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<th>Name</th>
|
||||||
|
|
||||||
|
<th>Mandatory</th>
|
||||||
|
|
||||||
|
<th>Type</th>
|
||||||
|
|
||||||
|
<th>Description</th>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
node
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
#foundry-message-warn
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
any
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
attribute-name
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
any
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
default-value
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
any
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<h2>Result</h2>
|
||||||
|
|
||||||
|
<h3>Result type</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
any
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
The value of the attribute if it is set on the current element, the
|
||||||
|
<code>default-value</code> otherwise.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The node from which the value of the attribute is read.
|
</section>
|
||||||
|
|
||||||
|
|
||||||
The attribute to check for.
|
<section id="foundry:get-setting" class="function">
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
Function foundry:get-setting
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
The default value if the attribute is not set.
|
<div>
|
||||||
|
|
||||||
|
<foundry:doc-desc xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Convenient function for calling <code>foundry:get-setting</code> with only the
|
||||||
|
module name and setting name.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</foundry:doc-desc>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The value of the attribute if it is set on the current element, the
|
<h2>Parameters</h2>
|
||||||
default-value otherwise.
|
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<th>Name</th>
|
||||||
|
|
||||||
|
<th>Mandatory</th>
|
||||||
|
|
||||||
|
<th>Type</th>
|
||||||
|
|
||||||
|
<th>Description</th>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
module
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
yes
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
string
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
The module of the settings. May be an empty string (<code>''</code>).
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
setting
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
yes
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
string
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
The name of the setting to retrieve.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<h2>Result</h2>
|
||||||
|
|
||||||
|
<h3>Result type</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
string
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
The value of the setting.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
A helper function for retrieving an attribute value from an element. If the
|
|
||||||
attribute is set on the current element the value of the attribute is used as
|
</section>
|
||||||
result. If the attribute is not set the default-value is used. This
|
|
||||||
method is used by several layout tags with optional attributes. A common use pattern
|
|
||||||
looks like this:
|
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="example">
|
<section id="foundry:get-setting" class="function">
|
||||||
<xsl:variable name="width"
|
|
||||||
select="foundry:get-attribute-value(current(), 'width', '640')" />
|
<h1>
|
||||||
<xsl:variable name="height"
|
Function foundry:get-setting
|
||||||
select="foundry:get-attribute-value(current(), 'height', '480')" />
|
|
||||||
/<xsl:template>
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
In this example, the element example has two optional attributes:
|
<div>
|
||||||
with and height. If the attribute is set in processed XML,
|
|
||||||
the value set there is used. Otherwise the default value (640
|
<foundry:doc-desc xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
respectively 480) is used. Without this function a code block like the
|
|
||||||
one in the xsl:choose block of this function would be necessary for
|
<p>
|
||||||
each of the variables.
|
Convenient function for calling <code>foundry:get-setting</code> with only the
|
||||||
|
module name, the setting name and an default value.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</foundry:doc-desc>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Parameters</h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<th>Name</th>
|
||||||
|
|
||||||
|
<th>Mandatory</th>
|
||||||
|
|
||||||
|
<th>Type</th>
|
||||||
|
|
||||||
|
<th>Description</th>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
module
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
yes
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
string
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
The module of the settings. May be an empty string (<code>''</code>).
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
setting
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
yes
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
string
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
The name of the setting to retrieve.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
default
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
yes
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
string
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
A default value which is used when the setting is not configured.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<h2>Result</h2>
|
||||||
|
|
||||||
|
<h3>Result type</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
string
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
The value of the setting or the default value if the setting is not configured.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2582,70 +3103,282 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The value of the requested setting or if no value has been set the provided default
|
The value of the requested setting or if no value has been set the provided default
|
||||||
value. If no default value has been provided the result is an empty string.
|
value. If no default value has been provided the result is an empty string.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
This function retrieves the value of a setting from the theme configuration. For
|
This function retrieves the value of a setting from the theme configuration. For
|
||||||
more informations about the configuration system of Foundry please refer to the
|
more informations about the configuration system of Foundry please refer to the
|
||||||
configuration section of the Foundry documentation.
|
configuration section of the Foundry documentation.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section id="foundry:get-static-text" class="function">
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
Function foundry:get-static-text
|
||||||
|
|
||||||
he module of the settings. At the moment this corresponds to the name of the file
|
</h1>
|
||||||
in the texts directory. The empty string as value corresponds to the
|
|
||||||
global.xml file.
|
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
The name of the text to retrieve.
|
<foundry:doc-desc xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Retrieves at static text. For more informations about static texts in Foundry please
|
||||||
|
refer to the static texts section in the Foundry documentation.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
The language to retrieve. Normally there is no need to set this parameter because
|
</foundry:doc-desc>
|
||||||
it is determined automatically.
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The requested static text. If there is no value for the requested static text in the
|
<h2>Parameters</h2>
|
||||||
module provided by the module parameter the value depends if the debug mode is
|
|
||||||
enabled or not. If the debug mode is not not enabled the result is an empty
|
|
||||||
string. If the debug mode is enabled, a identifier of the text (the value of the
|
|
||||||
id parameter) is displayed. If you point the mouse pointer of the
|
|
||||||
placeholder, the complete path of the text is shown as hovering box.
|
|
||||||
|
|
||||||
|
<table>
|
||||||
|
|
||||||
Retrieves at static text. For more informations about static texts in Foundry please
|
<thead>
|
||||||
refer to the static texts section in the Foundry documentation.
|
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<th>Name</th>
|
||||||
|
|
||||||
true if the debug mode if active, false otherwise.
|
<th>Mandatory</th>
|
||||||
|
|
||||||
|
<th>Type</th>
|
||||||
|
|
||||||
A helper function to determine if the debug mode should be enabled. The debug mode
|
<th>Description</th>
|
||||||
of foundry is automatically enabled if the theme is viewed as development theme.
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</thead>
|
||||||
|
|
||||||
Helper template for processing additional attributes. This are copied from the result
|
<tbody>
|
||||||
tree XML created by CCM to the HTML output generated by Foundry without any further
|
|
||||||
processing.
|
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
module
|
||||||
|
|
||||||
A helper function for reading the current category from the datatree. The
|
</td>
|
||||||
function joins the titles of all categories in nav:categoryPath to a
|
|
||||||
string. The tokens a separated by a slash (/).
|
|
||||||
|
|
||||||
|
<td>
|
||||||
|
yes
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
string
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
he module of the settings. At the moment this corresponds to the name of the file
|
||||||
|
in the <code>texts</code> directory. The empty string as value corresponds to the
|
||||||
|
<code>global.xml</code> file.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
id
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
yes
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
string
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
lang
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
no
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
string
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
The language to retrieve. Normally there is no need to set this parameter because
|
||||||
|
it is determined automatically.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<h2>Result</h2>
|
||||||
|
|
||||||
|
<h3>Result type</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
string
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
The requested static text. If there is no value for the requested static text in the
|
||||||
|
module provided by the module parameter the value depends if the debug mode is
|
||||||
|
enabled or not. If the debug mode is <em>not</em> not enabled the result is an empty
|
||||||
|
string. If the debug mode is enabled, a identifier of the text (the value of the
|
||||||
|
<code>id</code> parameter) is displayed. If you point the mouse pointer of the
|
||||||
|
placeholder, the complete path of the text is shown as hovering box.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section id="foundry:debug-enabled" class="function">
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
Function foundry:debug-enabled
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<foundry:doc-desc xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
A helper function to determine if the debug mode should be enabled. The debug mode
|
||||||
|
of foundry is automatically enabled if the theme is viewed as development theme.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</foundry:doc-desc>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<h2>Result</h2>
|
||||||
|
|
||||||
|
<h3>Result type</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
any
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
<code>true</code> if the debug mode if active, <code>false</code> otherwise.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section id="foundry:read-current-category" class="function">
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
Function foundry:read-current-category
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<h2>Result</h2>
|
||||||
|
|
||||||
|
<h3>Result type</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
any
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Description</h3>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<p xmlns="" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:foundry="http://foundry.libreccm.org" xmlns:nav="http://ccm.redhat.com/navigation">
|
||||||
|
The path of the current category.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2706,7 +3439,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The entry point for creating Foundry documentation.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
|
||||||
|
|
||||||
|
<jsp:directive.page import="javax.xml.transform.TransformerFactory"/>
|
||||||
|
<jsp:directive.page import="javax.xml.transform.Transformer"/>
|
||||||
|
<jsp:directive.page import="javax.xml.transform.stream.StreamSource"/>
|
||||||
|
<jsp:directive.page import="javax.xml.transform.stream.StreamResult"/>
|
||||||
|
|
||||||
|
<jsp:scriptlet>
|
||||||
|
|
||||||
|
response.setContentType("text/html;charset=utf-8");
|
||||||
|
|
||||||
|
TransformerFactory factory = TransformerFactory.newInstance();
|
||||||
|
Transformer transformer = factory.newTransformer(new StreamSource("../start.xsl"));
|
||||||
|
System.out.println(request.getContextPath());
|
||||||
|
transformer.setParameter("theme-prefix", request.getRequestURI() + "/../");
|
||||||
|
transformer.transform(new StreamSource("foundry-documentation.xml"),
|
||||||
|
new StreamResult(response.getOutputStream()));
|
||||||
|
|
||||||
|
</jsp:scriptlet>
|
||||||
|
</jsp:root>
|
||||||
|
|
@ -201,12 +201,12 @@
|
||||||
<xsl:when test="$internal = true()">
|
<xsl:when test="$internal = true()">
|
||||||
<xsl:apply-templates select="document(concat($theme-prefix,
|
<xsl:apply-templates select="document(concat($theme-prefix,
|
||||||
'foundry/templates/',
|
'foundry/templates/',
|
||||||
$template-file))"/>
|
normalize-space($template-file)))"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:apply-templates select="document(concat($theme-prefix,
|
<xsl:apply-templates select="document(concat($theme-prefix,
|
||||||
'/templates/',
|
'/templates/',
|
||||||
$template-file))"/>
|
normalize-space($template-file)))"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@
|
||||||
exclude-result-prefixes="xsl xs bebop cms foundry nav ui"
|
exclude-result-prefixes="xsl xs bebop cms foundry nav ui"
|
||||||
version="2.0">
|
version="2.0">
|
||||||
|
|
||||||
|
<xsl:import href="content-items/article.xsl"/>
|
||||||
|
|
||||||
<foundry:doc section="user" type="template-tag">
|
<foundry:doc section="user" type="template-tag">
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -85,32 +87,66 @@
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:template match="content-item">
|
<xsl:template match="content-item">
|
||||||
|
<xsl:variable name="mode">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="./@mode = 'detail'">
|
||||||
|
<xsl:value-of select="'detail'"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="./@mode = 'list'">
|
||||||
|
<xsl:value-of select="'list'"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="'detail'"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:if test="$data-tree/cms:contentPanel or $data-tree/nav:greetingItem">
|
<xsl:if test="$data-tree/cms:contentPanel or $data-tree/nav:greetingItem">
|
||||||
<xsl:variable name="contentitem-tree">
|
<xsl:variable name="contentitem-tree">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$data-tree/nav:greetingItem">
|
<xsl:when test="$data-tree/nav:greetingItem">
|
||||||
<xsl:value-of select="$data-tree/nav:greetingItem/cms:item"/>
|
<xsl:copy-of select="$data-tree/nav:greetingItem/cms:item/*"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$data-tree/cms:contentPanel/cms:item"/>
|
<xsl:copy-of select="$data-tree/cms:contentPanel/cms:item/*"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:variable name="oid" select="$contentitem-tree/masterVersion/@oid"/>
|
<xsl:variable name="oid" select="$contentitem-tree/masterVersion/@oid"/>
|
||||||
|
|
||||||
<xsl:variable name="content-section"
|
<xsl:variable name="content-section">
|
||||||
select="$contentitem-tree/../cms:pathInfo/cms:sectionPath"/>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$data-tree/nav:greetingItem">
|
||||||
|
<xsl:value-of select="$data-tree/nav:greetingItem/cms:pathInfo/cms:sectionPath"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$data-tree/cms:contentPanel/cms:pathInfo/cms:sectionPath"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:variable name="category" select="foundry:read-current-category()"/>
|
<xsl:variable name="category" select="foundry:read-current-category()"/>
|
||||||
|
|
||||||
<xsl:variable name="content-type" select="$contentitem-tree/object-type"/>
|
<xsl:variable name="content-type" select="$contentitem-tree/objectType"/>
|
||||||
|
|
||||||
<xsl:variable name="template-map"
|
<xsl:variable name="template-map">
|
||||||
select="document($theme-prefix/conf/templates.xml)/templates/content-items"/>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$mode = 'list'">
|
||||||
|
<xsl:copy-of select="document(concat($theme-prefix, '/conf/templates.xml'))/templates/content-items/list/*"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:copy-of select="document(concat($theme-prefix, '/conf/templates.xml'))/templates/content-items/detail/*"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$template-map/content-item[@oid = $oid]">
|
<xsl:when test="$template-map/content-item[@oid = $oid]">
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:value-of select="foundry:message-info('Found template for this special item.')"/>
|
||||||
|
</xsl:message>
|
||||||
|
|
||||||
<xsl:call-template name="foundry:process-contentitem-template">
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="$template-map/content-item[@oid = $oid]"/>
|
select="$template-map/content-item[@oid = $oid]"/>
|
||||||
|
|
@ -122,7 +158,7 @@
|
||||||
<xsl:when test="$template-map/content-item[@content-section = $content-section
|
<xsl:when test="$template-map/content-item[@content-section = $content-section
|
||||||
and @category = $category
|
and @category = $category
|
||||||
and @content-type = $content-type]">
|
and @content-type = $content-type]">
|
||||||
<xsl:call-template name="foundry:process-contentitem-template">
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="$template-map/content-item[@content-section = $content-section
|
select="$template-map/content-item[@content-section = $content-section
|
||||||
and @category = $category
|
and @category = $category
|
||||||
|
|
@ -148,7 +184,7 @@
|
||||||
<xsl:when test="$template-map/content-item[@content-section = $content-section
|
<xsl:when test="$template-map/content-item[@content-section = $content-section
|
||||||
and not(@category)
|
and not(@category)
|
||||||
and @content-type = $content-type]">
|
and @content-type = $content-type]">
|
||||||
<xsl:call-template name="foundry:process-contentitem-template">
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="$template-map/content-item[@content-section = $content-section
|
select="$template-map/content-item[@content-section = $content-section
|
||||||
and not(@category)
|
and not(@category)
|
||||||
|
|
@ -161,7 +197,7 @@
|
||||||
<xsl:when test="$template-map/content-item[@content-section = $content-section
|
<xsl:when test="$template-map/content-item[@content-section = $content-section
|
||||||
and not(@category)
|
and not(@category)
|
||||||
and not(@content-type)]">
|
and not(@content-type)]">
|
||||||
<xsl:call-template name="foundry:process-contentitem-template">
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="$template-map/content-item[@content-section = $content-section
|
select="$template-map/content-item[@content-section = $content-section
|
||||||
and not(@category)
|
and not(@category)
|
||||||
|
|
@ -174,7 +210,7 @@
|
||||||
<xsl:when test="$template-map/content-item[not(@content-section)
|
<xsl:when test="$template-map/content-item[not(@content-section)
|
||||||
and @category = $category
|
and @category = $category
|
||||||
and @content-type = $content-type]">
|
and @content-type = $content-type]">
|
||||||
<xsl:call-template name="foundry:process-contentitem-template">
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="$template-map/content-item[not(@content-section)
|
select="$template-map/content-item[not(@content-section)
|
||||||
and @category = $category
|
and @category = $category
|
||||||
|
|
@ -187,7 +223,7 @@
|
||||||
<xsl:when test="$template-map/content-item[not(@content-section)
|
<xsl:when test="$template-map/content-item[not(@content-section)
|
||||||
and @category = $category
|
and @category = $category
|
||||||
and not(@content-type)]">
|
and not(@content-type)]">
|
||||||
<xsl:call-template name="foundry:process-contentitem-template">
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="$template-map/content-item[not(@content-section)
|
select="$template-map/content-item[not(@content-section)
|
||||||
and @category = $category
|
and @category = $category
|
||||||
|
|
@ -200,7 +236,7 @@
|
||||||
<xsl:when test="$template-map/content-item[not(@content-section)
|
<xsl:when test="$template-map/content-item[not(@content-section)
|
||||||
and not(@category)
|
and not(@category)
|
||||||
and @content-type = $content-type]">
|
and @content-type = $content-type]">
|
||||||
<xsl:call-template name="foundry:process-contentitem-template">
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="$template-map/content-item[not(@content-section)
|
select="$template-map/content-item[not(@content-section)
|
||||||
and not(@category)
|
and not(@category)
|
||||||
|
|
@ -211,17 +247,30 @@
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
||||||
<xsl:when test="$template-map/default">
|
<xsl:when test="$template-map/default">
|
||||||
<xsl:call-template name="foundry:process-contentitem-template">
|
<xsl:message>
|
||||||
|
<xsl:value-of select="foundry:message-info('No template for item found. Using default')"/>
|
||||||
|
</xsl:message>
|
||||||
|
|
||||||
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="'contentitem-default.xml'"/>
|
select="$template-map/default"/>
|
||||||
<xsl:with-param name="contentitem-tree"
|
<xsl:with-param name="contentitem-tree"
|
||||||
select="$contentitem-tree"/>
|
select="$contentitem-tree"/>
|
||||||
<xsl:with-param name="internal" select="true()"/>
|
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:value-of select="foundry:message-info('No template for item found and not default configured. Using internal default')"/>
|
||||||
|
</xsl:message>
|
||||||
|
|
||||||
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
|
<xsl:with-param name="template-file"
|
||||||
|
select="concat('contentitem-default-', $mode ,'.xml')"/>
|
||||||
|
<xsl:with-param name="contentitem-tree"
|
||||||
|
select="$contentitem-tree"/>
|
||||||
|
<xsl:with-param name="internal" select="true()"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
@ -236,7 +285,7 @@
|
||||||
<xsl:when test="$internal = true()">
|
<xsl:when test="$internal = true()">
|
||||||
<xsl:apply-templates select="document(concat($theme-prefix,
|
<xsl:apply-templates select="document(concat($theme-prefix,
|
||||||
'foundry/templates/',
|
'foundry/templates/',
|
||||||
$template-file))">
|
normalize-space($template-file)))">
|
||||||
<xsl:with-param name="contentitem-tree"
|
<xsl:with-param name="contentitem-tree"
|
||||||
tunnel="yes"
|
tunnel="yes"
|
||||||
select="$contentitem-tree"/>
|
select="$contentitem-tree"/>
|
||||||
|
|
@ -245,7 +294,7 @@
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:apply-templates select="document(concat($theme-prefix,
|
<xsl:apply-templates select="document(concat($theme-prefix,
|
||||||
'/templates/',
|
'/templates/',
|
||||||
$template-file))">
|
normalize-space($template-file)))">
|
||||||
<xsl:with-param name="contentitem-tree"
|
<xsl:with-param name="contentitem-tree"
|
||||||
tunnel="yes"
|
tunnel="yes"
|
||||||
select="$contentitem-tree"/>
|
select="$contentitem-tree"/>
|
||||||
|
|
@ -254,4 +303,8 @@
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="content-item-layout">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2014 Jens Pelzetter for the LibreCCM Foundation
|
||||||
|
|
||||||
|
This file is part of the Foundry Theme Engine for LibreCCM
|
||||||
|
|
||||||
|
Foundry is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Foundry is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with Foundry If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
|
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||||
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
|
xmlns:foundry="http://foundry.libreccm.org"
|
||||||
|
xmlns:nav="http://ccm.redhat.com/navigation"
|
||||||
|
xmlns:ui="http://www.arsdigita.com/ui/1.0"
|
||||||
|
exclude-result-prefixes="xsl xs bebop cms foundry nav ui"
|
||||||
|
version="2.0">
|
||||||
|
|
||||||
|
<xsl:template match="/content-item-layout//lead-text">
|
||||||
|
<xsl:param name="contentitem-tree" tunnel="yes"/>
|
||||||
|
|
||||||
|
<xsl:value-of select="$contentitem-tree/lead"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="/content-item-layout//main-text">
|
||||||
|
<xsl:param name="contentitem-tree" tunnel="yes"/>
|
||||||
|
|
||||||
|
<xsl:value-of select="$contentitem-tree/textAsset/content"
|
||||||
|
disable-output-escaping="yes"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
@ -24,9 +24,6 @@
|
||||||
exclude-result-prefixes="xsl foundry"
|
exclude-result-prefixes="xsl foundry"
|
||||||
version="2.0">
|
version="2.0">
|
||||||
|
|
||||||
<xsl:template match="content-item">
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<foundry:doc section="user"
|
<foundry:doc section="user"
|
||||||
type="template-tag">
|
type="template-tag">
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
|
|
|
||||||
|
|
@ -205,6 +205,41 @@
|
||||||
<xsl:template match="body">
|
<xsl:template match="body">
|
||||||
<body>
|
<body>
|
||||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
|
|
||||||
|
<xsl:if test="foundry:debug-enabled()">
|
||||||
|
<div id="foundry-debug-panel">
|
||||||
|
<div id="foundry-debug-panel-content">
|
||||||
|
<h1>Foundry Debug Panel</h1>
|
||||||
|
<div>
|
||||||
|
<h2>Foundry system information</h2>
|
||||||
|
<dl>
|
||||||
|
<dt>Version</dt>
|
||||||
|
<dd>
|
||||||
|
<xsl:value-of select="$foundry-version"/>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h2>Server related environment variables</h2>
|
||||||
|
<dl>
|
||||||
|
<dt>theme-prefix</dt>
|
||||||
|
<dd>
|
||||||
|
<xsl:value-of select="$theme-prefix"/>
|
||||||
|
</dd>
|
||||||
|
<dt>context-prefix</dt>
|
||||||
|
<dd>
|
||||||
|
<xsl:value-of select="$context-prefix"/>
|
||||||
|
</dd>
|
||||||
|
<dt>dispatcher-prefix</dt>
|
||||||
|
<dd>
|
||||||
|
<xsl:value-of select="$dispatcher-prefix"/>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
<span id="top"/>
|
<span id="top"/>
|
||||||
<a href="#startcontent" accesskey="S" class="nav-hide">
|
<a href="#startcontent" accesskey="S" class="nav-hide">
|
||||||
<xsl:attribute name="title">
|
<xsl:attribute name="title">
|
||||||
|
|
@ -212,6 +247,7 @@
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:value-of select="foundry:get-static-text('', 'layout/page/skipnav/link')"/>
|
<xsl:value-of select="foundry:get-static-text('', 'layout/page/skipnav/link')"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</body>
|
</body>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
@ -395,6 +431,11 @@
|
||||||
|
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
|
|
||||||
|
<!-- Load the CSS files for Foundry's debug mode if debug mode is active -->
|
||||||
|
<xsl:if test="foundry:debug-enabled()">
|
||||||
|
<link rel="stylesheet" type="text/css" href="{$theme-prefix}/foundry/styles/debug-mode.css"/>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
<!-- Not implemented yet <xsl:call-template name="bebop:double-click-protection"/> -->
|
<!-- Not implemented yet <xsl:call-template name="bebop:double-click-protection"/> -->
|
||||||
|
|
||||||
<xsl:apply-templates select="$data-tree//script"/>
|
<xsl:apply-templates select="$data-tree//script"/>
|
||||||
|
|
@ -664,7 +705,7 @@
|
||||||
</table>
|
</table>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="tbody">
|
<xsl:template match="tbody">
|
||||||
<tbody>
|
<tbody>
|
||||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ XSLT 2.0 functions.
|
||||||
</foundry:doc-params>
|
</foundry:doc-params>
|
||||||
<foundry:doc-result type="xs:string">
|
<foundry:doc-result type="xs:string">
|
||||||
<p>
|
<p>
|
||||||
A message string of the for <code>[Foundry $level] $message</code> with
|
A message string of the form <code>[Foundry $level] $message</code> with
|
||||||
<code>$level</code> and <code>$message</code> replaced by the values of the
|
<code>$level</code> and <code>$message</code> replaced by the values of the
|
||||||
parameters.
|
parameters.
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -183,6 +183,12 @@ XSLT 2.0 functions.
|
||||||
The message text.
|
The message text.
|
||||||
</foundry:doc-param>
|
</foundry:doc-param>
|
||||||
</foundry:doc-params>
|
</foundry:doc-params>
|
||||||
|
<foundry:doc-result type="xs:string">
|
||||||
|
<p>
|
||||||
|
A message string of the form <code>[Foundry INFO] $message</code> with
|
||||||
|
<code>$message</code> replaced by the value of the parameter.
|
||||||
|
</p>
|
||||||
|
</foundry:doc-result>
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
<p>
|
<p>
|
||||||
Helper function to generate an info message. This function be used together with
|
Helper function to generate an info message. This function be used together with
|
||||||
|
|
@ -215,6 +221,12 @@ XSLT 2.0 functions.
|
||||||
The message text.
|
The message text.
|
||||||
</foundry:doc-param>
|
</foundry:doc-param>
|
||||||
</foundry:doc-params>
|
</foundry:doc-params>
|
||||||
|
<foundry:doc-result type="xs:string">
|
||||||
|
<p>
|
||||||
|
A message string of the form <code>[Foundry WARNING] $message</code> with
|
||||||
|
<code>$message</code> replaced by the value of the parameter.
|
||||||
|
</p>
|
||||||
|
</foundry:doc-result>
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
<p>
|
<p>
|
||||||
Helper function to generate an info message. This function be used together with
|
Helper function to generate an info message. This function be used together with
|
||||||
|
|
@ -242,13 +254,19 @@ XSLT 2.0 functions.
|
||||||
<xsl:sequence select="foundry:message('WARNING', $message)"/>
|
<xsl:sequence select="foundry:message('WARNING', $message)"/>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel" type="function">
|
||||||
<foundry:doc-params>
|
<foundry:doc-params>
|
||||||
<foundry:doc-param name="message"
|
<foundry:doc-param name="message"
|
||||||
mandatory="yes">
|
mandatory="yes">
|
||||||
The message text.
|
The message text.
|
||||||
</foundry:doc-param>
|
</foundry:doc-param>
|
||||||
</foundry:doc-params>
|
</foundry:doc-params>
|
||||||
|
<foundry:doc-result type="xs:string">
|
||||||
|
<p>
|
||||||
|
A message string of the form <code>[Foundry ERROR] $message</code> with
|
||||||
|
<code>$message</code> replaced by the value of the parameter.
|
||||||
|
</p>
|
||||||
|
</foundry:doc-result>
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
<p>
|
<p>
|
||||||
Helper function to generate an info message. This function be used together with
|
Helper function to generate an info message. This function be used together with
|
||||||
|
|
@ -277,7 +295,7 @@ XSLT 2.0 functions.
|
||||||
<xsl:sequence select="foundry:message('ERROR', $message)"/>
|
<xsl:sequence select="foundry:message('ERROR', $message)"/>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel" type="function">
|
||||||
<foundry:doc-params>
|
<foundry:doc-params>
|
||||||
<foundry:doc-param name="node">
|
<foundry:doc-param name="node">
|
||||||
The node from which the value of the attribute is read.
|
The node from which the value of the attribute is read.
|
||||||
|
|
@ -290,8 +308,10 @@ XSLT 2.0 functions.
|
||||||
</foundry:doc-param>
|
</foundry:doc-param>
|
||||||
</foundry:doc-params>
|
</foundry:doc-params>
|
||||||
<foundry:doc-result>
|
<foundry:doc-result>
|
||||||
The value of the attribute if it is set on the current element, the
|
<p>
|
||||||
<code>default-value</code> otherwise.
|
The value of the attribute if it is set on the current element, the
|
||||||
|
<code>default-value</code> otherwise.
|
||||||
|
</p>
|
||||||
</foundry:doc-result>
|
</foundry:doc-result>
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -334,6 +354,31 @@ XSLT 2.0 functions.
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
|
<foundry:doc section="devel" type="function">
|
||||||
|
<foundry:doc-desc>
|
||||||
|
<p>
|
||||||
|
Convenient function for calling <code>foundry:get-setting</code> with only the
|
||||||
|
module name and setting name.
|
||||||
|
</p>
|
||||||
|
</foundry:doc-desc>
|
||||||
|
<foundry:doc-params>
|
||||||
|
<foundry:doc-param name="module" mandatory="yes" type="string">
|
||||||
|
<p>
|
||||||
|
The module of the settings. May be an empty string (<code>''</code>).
|
||||||
|
</p>
|
||||||
|
</foundry:doc-param>
|
||||||
|
<foundry:doc-param name="setting" mandatory="yes" type="string">
|
||||||
|
<p>
|
||||||
|
The name of the setting to retrieve.
|
||||||
|
</p>
|
||||||
|
</foundry:doc-param>
|
||||||
|
</foundry:doc-params>
|
||||||
|
<foundry:doc-result type="string">
|
||||||
|
<p>
|
||||||
|
The value of the setting.
|
||||||
|
</p>
|
||||||
|
</foundry:doc-result>
|
||||||
|
</foundry:doc>
|
||||||
<xsl:function name="foundry:get-setting" as="xs:string">
|
<xsl:function name="foundry:get-setting" as="xs:string">
|
||||||
<xsl:param name="module" as="xs:string"/>
|
<xsl:param name="module" as="xs:string"/>
|
||||||
<xsl:param name="setting" as="xs:string"/>
|
<xsl:param name="setting" as="xs:string"/>
|
||||||
|
|
@ -341,6 +386,36 @@ XSLT 2.0 functions.
|
||||||
<xsl:sequence select="foundry:get-setting($module, $setting, '', '')"/>
|
<xsl:sequence select="foundry:get-setting($module, $setting, '', '')"/>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
|
<foundry:doc section="devel" type="function">
|
||||||
|
<foundry:doc-desc>
|
||||||
|
<p>
|
||||||
|
Convenient function for calling <code>foundry:get-setting</code> with only the
|
||||||
|
module name, the setting name and an default value.
|
||||||
|
</p>
|
||||||
|
</foundry:doc-desc>
|
||||||
|
<foundry:doc-params>
|
||||||
|
<foundry:doc-param name="module" mandatory="yes" type="string">
|
||||||
|
<p>
|
||||||
|
The module of the settings. May be an empty string (<code>''</code>).
|
||||||
|
</p>
|
||||||
|
</foundry:doc-param>
|
||||||
|
<foundry:doc-param name="setting" mandatory="yes" type="string">
|
||||||
|
<p>
|
||||||
|
The name of the setting to retrieve.
|
||||||
|
</p>
|
||||||
|
</foundry:doc-param>
|
||||||
|
<foundry:doc-param name="default" mandatory="yes" type="string">
|
||||||
|
<p>
|
||||||
|
A default value which is used when the setting is not configured.
|
||||||
|
</p>
|
||||||
|
</foundry:doc-param>
|
||||||
|
</foundry:doc-params>
|
||||||
|
<foundry:doc-result type="string">
|
||||||
|
<p>
|
||||||
|
The value of the setting or the default value if the setting is not configured.
|
||||||
|
</p>
|
||||||
|
</foundry:doc-result>
|
||||||
|
</foundry:doc>
|
||||||
<xsl:function name="foundry:get-setting" as="xs:string">
|
<xsl:function name="foundry:get-setting" as="xs:string">
|
||||||
<xsl:param name="module" as="xs:string"/>
|
<xsl:param name="module" as="xs:string"/>
|
||||||
<xsl:param name="setting" as="xs:string"/>
|
<xsl:param name="setting" as="xs:string"/>
|
||||||
|
|
@ -351,36 +426,34 @@ XSLT 2.0 functions.
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel">
|
||||||
<foundry:doc-params>
|
<foundry:doc-params>
|
||||||
<foundry:doc-param name="module"
|
<foundry:doc-param name="module" mandatory="yes" type="string">
|
||||||
mandatory="yes">
|
|
||||||
<p>
|
<p>
|
||||||
The module of the settings. At the moment this corresponds to the name of the file
|
The module of the settings. At the moment this corresponds to the name of the file
|
||||||
in the <code>conf</code> directory. The empty string as value corresponds to the
|
in the <code>conf</code> directory. The empty string as value corresponds to the
|
||||||
<code>global.xml</code> file.
|
<code>global.xml</code> file.
|
||||||
</p>
|
</p>
|
||||||
</foundry:doc-param>
|
</foundry:doc-param>
|
||||||
<foundry:doc-param name="setting"
|
<foundry:doc-param name="setting" mandatory="yes" type="string">
|
||||||
mandatory="yes">
|
|
||||||
<p>
|
<p>
|
||||||
The name of the setting to retrieve.
|
The name of the setting to retrieve.
|
||||||
</p>
|
</p>
|
||||||
</foundry:doc-param>
|
</foundry:doc-param>
|
||||||
<foundry:doc-param name="default"
|
<foundry:doc-param name="default" mandatory="no" type="string">
|
||||||
mandatory="no">
|
|
||||||
<p>
|
<p>
|
||||||
The value to use if there is no entry for the setting in the settings file.
|
The value to use if there is no entry for the setting in the settings file.
|
||||||
</p>
|
</p>
|
||||||
</foundry:doc-param>
|
</foundry:doc-param>
|
||||||
<foundry:doc-param name="node"
|
<foundry:doc-param name="node" mandatory="no" type="string">
|
||||||
mandatory="no">
|
|
||||||
<p>
|
<p>
|
||||||
A node from the layout template which overrides the value from the configuration.
|
A node from the layout template which overrides the value from the configuration.
|
||||||
</p>
|
</p>
|
||||||
</foundry:doc-param>
|
</foundry:doc-param>
|
||||||
</foundry:doc-params>
|
</foundry:doc-params>
|
||||||
<foundry:doc-result>
|
<foundry:doc-result type="string">
|
||||||
The value of the requested setting or if no value has been set the provided default
|
<p>
|
||||||
value. If no default value has been provided the result is an empty string.
|
The value of the requested setting or if no value has been set the provided default
|
||||||
|
value. If no default value has been provided the result is an empty string.
|
||||||
|
</p>
|
||||||
</foundry:doc-result>
|
</foundry:doc-result>
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
This function retrieves the value of a setting from the theme configuration. For
|
This function retrieves the value of a setting from the theme configuration. For
|
||||||
|
|
@ -441,39 +514,40 @@ XSLT 2.0 functions.
|
||||||
<xsl:sequence select="foundry:get-static-text($module, $id, $html, $lang)"/>
|
<xsl:sequence select="foundry:get-static-text($module, $id, $html, $lang)"/>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel" type="function">
|
||||||
<foundry:doc-params>
|
<foundry:doc-params>
|
||||||
<foundry:doc-param name="module"
|
<foundry:doc-param name="module" mandatory="yes" type="string">
|
||||||
mandatory="yes">
|
|
||||||
<p>
|
<p>
|
||||||
he module of the settings. At the moment this corresponds to the name of the file
|
he module of the settings. At the moment this corresponds to the name of the file
|
||||||
in the <code>texts</code> directory. The empty string as value corresponds to the
|
in the <code>texts</code> directory. The empty string as value corresponds to the
|
||||||
<code>global.xml</code> file.
|
<code>global.xml</code> file.
|
||||||
</p>
|
</p>
|
||||||
</foundry:doc-param>
|
</foundry:doc-param>
|
||||||
<foundry:doc-param name="id"
|
<foundry:doc-param name="id" mandatory="yes" type="string">
|
||||||
mandatory="yes">
|
|
||||||
The name of the text to retrieve.
|
The name of the text to retrieve.
|
||||||
</foundry:doc-param>
|
</foundry:doc-param>
|
||||||
<foundry:doc-param name="lang"
|
<foundry:doc-param name="lang" mandatory="no" type="string">
|
||||||
mandatory="no">
|
|
||||||
<p>
|
<p>
|
||||||
The language to retrieve. Normally there is no need to set this parameter because
|
The language to retrieve. Normally there is no need to set this parameter because
|
||||||
it is determined automatically.
|
it is determined automatically.
|
||||||
</p>
|
</p>
|
||||||
</foundry:doc-param>
|
</foundry:doc-param>
|
||||||
</foundry:doc-params>
|
</foundry:doc-params>
|
||||||
<foundry:doc-result>
|
<foundry:doc-result type="string">
|
||||||
The requested static text. If there is no value for the requested static text in the
|
<p>
|
||||||
module provided by the module parameter the value depends if the debug mode is
|
The requested static text. If there is no value for the requested static text in the
|
||||||
enabled or not. If the debug mode is <em>not</em> not enabled the result is an empty
|
module provided by the module parameter the value depends if the debug mode is
|
||||||
string. If the debug mode is enabled, a identifier of the text (the value of the
|
enabled or not. If the debug mode is <em>not</em> not enabled the result is an empty
|
||||||
<code>id</code> parameter) is displayed. If you point the mouse pointer of the
|
string. If the debug mode is enabled, a identifier of the text (the value of the
|
||||||
placeholder, the complete path of the text is shown as hovering box.
|
<code>id</code> parameter) is displayed. If you point the mouse pointer of the
|
||||||
|
placeholder, the complete path of the text is shown as hovering box.
|
||||||
|
</p>
|
||||||
</foundry:doc-result>
|
</foundry:doc-result>
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
Retrieves at static text. For more informations about static texts in Foundry please
|
<p>
|
||||||
refer to the static texts section in the Foundry documentation.
|
Retrieves at static text. For more informations about static texts in Foundry please
|
||||||
|
refer to the static texts section in the Foundry documentation.
|
||||||
|
</p>
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:function name="foundry:get-static-text" as="xs:string">
|
<xsl:function name="foundry:get-static-text" as="xs:string">
|
||||||
|
|
@ -544,31 +618,43 @@ XSLT 2.0 functions.
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel" type="function">
|
||||||
<foundry:doc-result>
|
<foundry:doc-result>
|
||||||
<code>true</code> if the debug mode if active, <code>false</code> otherwise.
|
<p>
|
||||||
|
<code>true</code> if the debug mode if active, <code>false</code> otherwise.
|
||||||
|
</p>
|
||||||
</foundry:doc-result>
|
</foundry:doc-result>
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
A helper function to determine if the debug mode should be enabled. The debug mode
|
<p>
|
||||||
of foundry is automatically enabled if the theme is viewed as development theme.
|
A helper function to determine if the debug mode should be enabled. The debug mode
|
||||||
|
of foundry is automatically enabled if the theme is viewed as development theme.
|
||||||
|
</p>
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:function name="foundry:debug-enabled" as="xs:boolean">
|
<xsl:function name="foundry:debug-enabled" as="xs:boolean">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="contains($theme-prefix, 'devel-themedir')">
|
<xsl:when test="contains($theme-prefix, 'devel-themedir')">
|
||||||
|
<xsl:message>
|
||||||
|
debug mode active
|
||||||
|
</xsl:message>
|
||||||
<xsl:sequence select="true()"/>
|
<xsl:sequence select="true()"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
|
<xsl:message>
|
||||||
|
debug mode NOT active
|
||||||
|
</xsl:message>
|
||||||
<xsl:sequence select="false()"/>
|
<xsl:sequence select="false()"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel" type="function-template">
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
Helper template for processing additional attributes. This are copied from the result
|
<p>
|
||||||
tree XML created by CCM to the HTML output generated by Foundry without any further
|
Helper template for processing additional attributes. This are copied from the result
|
||||||
processing.
|
tree XML created by CCM to the HTML output generated by Foundry without any further
|
||||||
|
processing.
|
||||||
|
</p>
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:template name="foundry:process-attributes">
|
<xsl:template name="foundry:process-attributes">
|
||||||
|
|
@ -588,15 +674,22 @@ XSLT 2.0 functions.
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel" type="function">
|
||||||
<xsl:doc-desc>
|
<xsl:doc-desc>
|
||||||
A helper function for reading the current category from the <code>datatree</code>. The
|
<p>
|
||||||
function joins the titles of all categories in <code>nav:categoryPath</code> to a
|
A helper function for reading the current category from the <code>datatree</code>. The
|
||||||
string. The tokens a separated by a slash (<code>/</code>).
|
function joins the titles of all categories in <code>nav:categoryPath</code> to a
|
||||||
|
string. The tokens a separated by a slash (<code>/</code>).
|
||||||
|
</p>
|
||||||
</xsl:doc-desc>
|
</xsl:doc-desc>
|
||||||
|
<foundry:doc-result>
|
||||||
|
<p>
|
||||||
|
The path of the current category.
|
||||||
|
</p>
|
||||||
|
</foundry:doc-result>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:function name="foundry:read-current-category">
|
<xsl:function name="foundry:read-current-category">
|
||||||
<xsl:sequence select="string-join($data-tree/nav:categoryPath/@title, '/')"/>
|
<xsl:sequence select="string-join($data-tree/nav:categoryPath/nav:category/@title, '/')"/>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
<xsl:function name="foundry:shying" as="xs:string">
|
<xsl:function name="foundry:shying" as="xs:string">
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
</xsl:message>
|
</xsl:message>
|
||||||
<xsl:call-template name="foundry:process-template">
|
<xsl:call-template name="foundry:process-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="document(concat($theme-prefix, '/conf/templates.xml'))/applications/application[@name=$application and not(@class)]"/>
|
select="document(concat($theme-prefix, '/conf/templates.xml'))/templates/applications/application[@name=$application and not(@class)]"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
|
|
@ -73,10 +73,10 @@
|
||||||
<xsl:value-of select="foundry:message-info('Using default layout')"/>
|
<xsl:value-of select="foundry:message-info('Using default layout')"/>
|
||||||
</xsl:message>
|
</xsl:message>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="document(concat($theme-prefix, '/conf/templates.xml'))/applications/default">
|
<xsl:when test="document(concat($theme-prefix, '/conf/templates.xml'))/templates/applications/default">
|
||||||
<xsl:call-template name="foundry:process-template">
|
<xsl:call-template name="foundry:process-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="document(concat($theme-prefix, '/conf/templates.xml'))/applications/default"/>
|
select="document(concat($theme-prefix, '/conf/templates.xml'))/templates/applications/default"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
|
|
@ -99,41 +99,14 @@
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<!--<foundry:doc section="devel">
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
The entry point for creating Foundry documentation.
|
<p>
|
||||||
|
The entry point for creating Foundry documentation.
|
||||||
|
</p>
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
</foundry:doc>
|
</foundry:doc>-->
|
||||||
<xsl:template match="/foundry:documentation">
|
<xsl:template match="/foundry:documentation">
|
||||||
<!--<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type"
|
|
||||||
content="text/html; charset=UTF-8"/>
|
|
||||||
<title>Foundry Theming Engine for LibreCCM - Documentation</title>
|
|
||||||
<style type="text/css">
|
|
||||||
.missing-static-text {
|
|
||||||
border: 2px solid red;
|
|
||||||
color: red;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<header>
|
|
||||||
Header
|
|
||||||
</header>
|
|
||||||
<nav>
|
|
||||||
Navigation
|
|
||||||
</nav>
|
|
||||||
<main>
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</main>
|
|
||||||
<footer>
|
|
||||||
Footer
|
|
||||||
</footer>
|
|
||||||
</body>
|
|
||||||
</html>-->
|
|
||||||
|
|
||||||
<xsl:apply-templates select="document(concat($theme-prefix, '/foundry/templates/doc/foundry-documentation.xml'))"/>
|
<xsl:apply-templates select="document(concat($theme-prefix, '/foundry/templates/doc/foundry-documentation.xml'))"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
#foundry-debug-panel {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#foundry-debug-panel #foundry-debug-panel-content{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#foundry-debug-panel:hover {
|
||||||
|
width: 100%;
|
||||||
|
height: 24em;
|
||||||
|
background-color: #000;
|
||||||
|
/*border: 1px solid #0ff;*/
|
||||||
|
border-radius: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#foundry-debug-panel:hover #foundry-debug-panel-content {
|
||||||
|
display: block;
|
||||||
|
overflow:auto;
|
||||||
|
margin: 0.2em 1em;
|
||||||
|
font-family: monospace;
|
||||||
|
font-size: 10pt;
|
||||||
|
color: #0ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#foundry-debug-panel:hover #foundry-debug-panel-content dl {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#foundry-debug-panel:hover #foundry-debug-panel-content dt {
|
||||||
|
float: left;
|
||||||
|
width: 15em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#foundry-debug-panel:hover #foundry-debug-panel-content dt::after {
|
||||||
|
content: " = ";
|
||||||
|
}
|
||||||
|
|
||||||
|
#foundry-debug-panel:hover #foundry-debug-panel-content dd {
|
||||||
|
padding-left: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#foundry-debug-panel:hover #foundry-debug-panel-content dd::after {
|
||||||
|
clear: both;
|
||||||
|
content: " ";
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<content-item-layout>
|
||||||
|
|
||||||
|
<div class="lead">
|
||||||
|
<lead-text/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="main">
|
||||||
|
<main-text/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</content-item-layout>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<content-item-layout>
|
||||||
|
<div>
|
||||||
|
<show-property name="pageDescription"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</content-item-layout>
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
<show-text>layout/page/head/title</show-text>
|
<show-text>layout/page/head/title</show-text>
|
||||||
<show-page-title/>
|
<show-page-title/>
|
||||||
</title>
|
</title>
|
||||||
|
<load-css-files/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<nav>
|
<nav>
|
||||||
|
|
@ -14,7 +15,7 @@
|
||||||
<navigation-title/>
|
<navigation-title/>
|
||||||
</a>
|
</a>
|
||||||
</navigation-home-link>
|
</navigation-home-link>
|
||||||
<h1><show-text>layout/page/head/title</show-text></h1>
|
<h1><show-text>layout/page/head/title</show-text>: <show-page-title/></h1>
|
||||||
<navigation>
|
<navigation>
|
||||||
<div class="nav-wrapper">
|
<div class="nav-wrapper">
|
||||||
<navigation-links>
|
<navigation-links>
|
||||||
|
|
@ -33,6 +34,7 @@
|
||||||
<main>
|
<main>
|
||||||
<div>
|
<div>
|
||||||
<h1>TEST</h1>
|
<h1>TEST</h1>
|
||||||
|
<content-item/>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue