0.2releasedXSL Resource Loader
Enables attaching Resources to the page XSL
Clone URLhttps://github.com/nils-werner/xslresourceloader.git
Add as a submodulegit submodule add https://github.com/nils-werner/xslresourceloader.git extensions/xslresourceloader --recursive
Compatibility
2.x.x | 2.1.x | 2.2.x | 2.3.x | 2.4.x | 2.5.x | 2.6.x | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.7.4 | 2.7.5 | 2.7.6 | 2.7.7 | 2.7.8 | 2.7.9 | 2.7.10 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
No | No | No | 0.2 | No | No | No | No | No | No | No | No | No | No | No | No | No | No. Soon? |
Readme
XSL Resource Loader
The XSL Resource Loader allows you to add data sources and events to your pages directly in each page's XSL.
Installation
- Upload the
xslresourceloader
folder in this archive to your Symphony/extensions
folder. - Enable it by selecting the "XSL Resource Loader", choose Enable from the with-selected menu, then click Apply.
Usage
After installing this extension you can add two new XML element to your XSL stylesheet: data-source
and event
. The handle of the resource to be loaded is named in the name
attribute.
The elements themselves are required to belong to a separate XML-Namespace http://symphony-cms.com/schemas/resources/1.0
so make sure to add this one to your xsl:stylesheet
definition.
Example
The following code loads the Data Source articles
and the Event comments
:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:res="http://symphony-cms.com/schemas/resources/1.0"
exclude-result-prefixes="res">
<res:data-source name="articles" />
<res:event name="comments" />
...
</xsl:stylesheet>
Version history
Requires Symphony 2.3
- Fixed issue of empty result breaking
foreach
Requires Symphony 2.3
- Initial release