Templating
This extension uses Extbase / Fluid default functionality for templating, even though, there is come custom configuration to handle gallery types.
So by default, TYPO3 will search in the default template root path of the extension: EXT:
If you change the template path like this: plugin.
,
TYPO3 will search for EXT:
.
How to configure the template file for each gallery type
This extension allows to define multiple gallery types. Each gallery type needs a custom template file.
To accomplish this, there are two TypoScript settings: template
and template
(used for the item detail view)
You can change the path for each gallery type by using the following TS:
plugin.
See the example TypoScript files for more info!
Tip
When using more than one gallery type, you should always use template
(and template
) TS settings
in order to configure the template file for each gallery type!
Available variables
uid
: current plugin content element UID (localized)gallery
: current plugin gallery type (single, images, collection)Type data.
: current plugin content element datacontent data.
: current page datapage data.
: current page layoutpage Layout data.
: current page backend layoutpage Backend Layout item
: Single image item in detail viewcollection
: Image collection array in list view
ViewHelpers
ForGroup
A pair of ViewHelpers to assist you when building groups of items.
Example
<f:for each="{color1: 'red', color2: 'green', color3: 'blue', color4: 'yellow'}" as="item" iteration="iterator">
<gg:forGroup.begin iteration="{iterator}" max="2">
<ul class="colors">
</gg:forGroup.begin>
<li class="span6" style="color: {item};>
{item}
</li>
<gg:forGroup.end iteration="{iterator}" max="2">
</ul>
</gg:forGroup.end>
</f:for>
Result:
<ul class="colors">
<li class="span6" style="color: red;>
red
</li>
<li class="span6" style="color: green;>
green
</li>
</ul>
<ul class="colors">
<li class="span6" style="color: blue;>
blue
</li>
<li class="span6" style="color: yellow;>
yellow
</li>
</ul>
FAL Metadata
Use the image
property for image meta data. The image
array provides the FAL meta data merged
with inline file reference meta data. In addition image
processes some EXIF meta data to be more usable
(some properties are transformed into a human readable format).
Use item.
for raw FAL meta data.
Tip
Which meta data is available depends on your installation and extensions.
Example
This examples is tested with EXTmetadata
.
<f:for each="{collection}" as="item" iteration="iterator">
<figure>
<f:image src="{item.image.uid}" alt="{item.imageData.description}" />
<p>
{item.imageData.camera_model} {item.imageData.shutter_speed_value} {item.imageData.aperture_value}
{item.imageData.focal_length} {item.imageData.iso_speed_ratings} ({item.imageData.flash})
</p>
</figure>
</f:for>