Skip to content

Instantly share code, notes, and snippets.

@misterboe
Created September 26, 2016 08:25
Show Gist options
  • Save misterboe/5de7498e810ebd57f7bfb4d2a7abeb66 to your computer and use it in GitHub Desktop.
Save misterboe/5de7498e810ebd57f7bfb4d2a7abeb66 to your computer and use it in GitHub Desktop.
Override Slickcarousel
tt_content.slickcarousel = FLUIDTEMPLATE
tt_content.slickcarousel {
templateRootPaths {
20 = fileadmin/slickcarousel/Templates/
}
partialRootPaths {
20 = fileadmin/slickcarousel/Partials/
}
layoutRootPaths {
20 = fileadmin/slickcarousel/Layouts/
}
}
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://xsd.helhum.io/ns/typo3/cms-fluid/master/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="Main">
<div class="slick-container">
<f:if condition="{v:variable.typoscript(path: 'plugin.tx_slickcarousel.slick_progressbar_expert')}">
<f:if condition="{data.pi_flexform.autoplay}">
<div id="loader-slick-id{data.uid}"></div>
</f:if>
</f:if>
<div class="slick-slider slick-default" id="slick-id{data.uid}">
<f:if condition="{data.pi_flexform.randomSlide} == 'vhs'">
<v:iterator.sort subject="{slickimages}" as="slickimages" order="RAND" />
</f:if>
<f:for each="{slickimages}" as="file" iteration="i">
<div class="slick-item">
<f:link.typolink parameter="{file.properties.link}">
<figure>
<img class="slick-img" data-lazy="{f:uri.image(image: file, maxWidth: 1980)}" title="{file.title}" alt="{file.alternative}" />
<f:if condition="{file.description}">
<figcaption>{file.description}</figcaption>
</f:if>
</figure>
</f:link.typolink>
</div>
</f:for>
</div>
</div>
<f:render partial="AssetAll" section="JS-Responsive" arguments="{_all}" />
<f:if condition="{v:variable.typoscript(path: 'plugin.tx_slickcarousel.slick_progressbar_expert')}">
<f:if condition="{data.pi_flexform.autoplay}">
<f:render partial="ProgressBar" section="ProgressBar" arguments="{_all}" />
</f:if>
</f:if>
</f:section>
</div>
@misterboe
Copy link
Author

Link the slide with the "Image Link" field

@misterboe
Copy link
Author

Override the template path with fallback to the original files. You could place your own template there

@kuchi62
Copy link

kuchi62 commented Mar 7, 2017

Ok thank you. I try this later and give you feedback.

@kuchi62
Copy link

kuchi62 commented Mar 7, 2017

Thank you very much! This is it. BR Jens

@kuchi62
Copy link

kuchi62 commented Nov 14, 2017

Hi misterboe,

With TYPO3 7.6 and slickcarousel 1.1.0 everything was fine.

Now I have the same problem with slickcarousel 2.0.0 and TYPO3 8.7.8. / Changing the Paths and file but no Result.

Best Regards. Jens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment