-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sebastian Dammark
committed
Nov 23, 2014
1 parent
2d51013
commit 8d72cd1
Showing
4 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Archetype Helper | ||
|
||
Helper file for rendering Archetype fieldsets: | ||
|
||
## How to use it | ||
|
||
1. Include this file in your main XSLT file: | ||
|
||
```xslt | ||
<xsl:include href="_ArcheType.xslt" /> | ||
``` | ||
|
||
2. Create templates as usual for the types of nodes that are selectable in the picker, e.g.: | ||
|
||
```xslt | ||
<xsl:template match="fieldsets[alias='textcontent']"> | ||
<!-- Code for textcontent --> | ||
</xsl:template> | ||
|
||
<xsl:template match="fieldsets[alias='mediacontent']"> | ||
<!-- Code for mediacontent --> | ||
</xsl:template> | ||
``` | ||
|
||
3. Apply templates in "multipicker" mode, to the picker property: | ||
|
||
```xslt | ||
<xsl:apply-templates select="myArchetypeProperty" mode="archetype" /> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Media Helper | ||
|
||
Helper file for rendering media from the media section: | ||
|
||
## How to use it | ||
|
||
1. Include this file in your main XSLT file: | ||
|
||
```xslt | ||
<xsl:include href="_MediaHelper.xslt" /> | ||
``` | ||
|
||
2. Apply templates in "media" mode, to the media picker property: | ||
|
||
```xslt | ||
<xsl:template match="myMediaProperty" mode=="media" /> | ||
``` | ||
|
||
### Properties | ||
|
||
The helper takes 2 properties: | ||
- cropset | ||
- quality (default is 90) | ||
|
||
If you're using the built-in Image Cropper, you can use the helper like this: | ||
|
||
```xslt | ||
<xsl:apply-templates select="myMediaProperty" mode="media"> | ||
<xsl:with-param name="cropset" select="'mycropsetname'" /> | ||
<xsl:with-param name="quality" select="85" /> | ||
</xsl:apply-templates> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# MultiNodeTreePicker Helper | ||
|
||
Helper file for rendering MultiNodeTreePickers(MNTP): | ||
|
||
## How to use it | ||
|
||
1. Include this file in your main XSLT file: | ||
|
||
```xslt | ||
<xsl:include href="_MultiNodePreePicker.xslt" /> | ||
``` | ||
|
||
2. Create templates as usual for the types of nodes that are selectable in the picker, e.g.: | ||
|
||
```xslt | ||
<xsl:template match="mydocument"> | ||
<!-- Code for mydocument --> | ||
</xsl:template> | ||
``` | ||
|
||
3. Apply templates in "mntp" mode, to the MNTP property: | ||
|
||
```xslt | ||
<xsl:template match="myMNTPProperty" mode="mntp" /> | ||
``` |