Skip to content

Instantly share code, notes, and snippets.

@boettner-it
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boettner-it/c22a98ca4e0619585a9d to your computer and use it in GitHub Desktop.
Save boettner-it/c22a98ca4e0619585a9d to your computer and use it in GitHub Desktop.
Aimeos TYPO3 Fluid shop page template with single product navigation links
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:flux="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:layout name="Page"/>
<f:section name="Configuration">
<flux:form id="shop" label="Shop" icon="{f:uri.resource(path: 'Backend/Icons/ShopPage.png')}">
<flux:grid>
<v:condition.type.isArray value="{elements}">
<f:for each="{elements}" as="element" iteration="iteration">
<f:for each="{element}" key="elementType" as="elementData">
<f:if condition="{0: elementType} == {0: 'content'}">
<flux:grid.row>
<flux:grid.column name="{elementData.id}" label="Content: {elementData.id}"/>
</flux:grid.row>
</f:if>
</f:for>
</f:for>
</v:condition.type.isArray>
</flux:grid>
<flux:form.sheet name="elements">
<flux:form.section name="elements">
<flux:form.object name="product">
<flux:field.input name="id"/>
<flux:field.input name="linktext"/>
</flux:form.object>
<flux:form.object name="page">
<flux:field.relation name="id" table="pages" minItems="0" maxItems="1" default="">
<flux:wizard.suggest table="pages"/>
</flux:field.relation>
</flux:form.object>
</flux:form.section>
</flux:form.sheet>
</flux:form>
<flux:grid>
<flux:grid.row>
<flux:grid.column colPos="0" name="Main Content"/>
<flux:grid.column colPos="3" name="Sidebar Content"/>
</flux:grid.row>
</flux:grid>
</f:section>
<f:section name="Preview">
</f:section>
<f:section name="Main">
<div class="row" role="main">
<div class="col-md-2 col-sm-2" role="section">
<ul>
<f:for each="{elements}" as="element" iteration="iteration">
<li>
<f:for each="{element}" key="elementType" as="elementData">
<v:switch value="{elementType}">
<v:case case="product" break="true">
<v:variable.set name="ai" value="{d-product-id: elementData.id, a-name: elementData.linktext}" />
<f:link.page pageUid="13" additionalParams="{ai: ai}">
<f:if condition="{elementData.linktext}">
<f:then>{elementData.linktext}</f:then>
<f:else>Productlink</f:else>
</f:if>
</f:link.page>
</v:case>
<v:case case="page" break="true">
<f:link.page pageUid="{elementData.id}">{elementData.id}</f:link.page>
</v:case>
<v:case case="default">
</v:case>
</v:switch>
</f:for>
</li>
</f:for>
</ul>
<v:content.render contentUids="{0: 21}"/>
<f:render section="Navigation" partial="Navigation" optional="true"
arguments="{recursionStartPageUid: '15'}"/>
</div>
<div class="col-md-8 col-sm-8" role="section">
<v:content.render column="0"/>
<v:content.render contentUids="{0: 20}"/>
<v:content.render contentUids="{0: 19}"/>
</div>
<aside class="col-md-2 col-sm-2" role="complementary">
<v:content.render contentUids="{0: 22}"/>
<v:content.render column="3"/>
</aside>
</div>
</f:section>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment