Skip to content

Instantly share code, notes, and snippets.

@Lefaux
Created November 24, 2014 20:00
Show Gist options
  • Save Lefaux/bf4ca83a34755ed58f45 to your computer and use it in GitHub Desktop.
Save Lefaux/bf4ca83a34755ed58f45 to your computer and use it in GitHub Desktop.
<div class="addressblock">
<f:for each="{rows}" as="address" key="number">
<f:cycle values="{0: 0, 1: 1}" as="cycle">
<f:if condition="{cycle}">
<f:then><div class="location last"></f:then>
<f:else><div class="location first"></f:else>
</f:if>
<h4>{address.name}</h4>
<div class="locationdata">
<p class="company">{address.company}</p>
<p class="unit">{address.title}</p>
<p class="address">{address.address}<br />
{address.zip} {address.city}</p>
<div class="contact-stuff">
<f:if condition="{0:address.phone} != {0:''}">
<p class="telephone">{address.phone}</p>
</f:if>
<f:if condition="{0:address.fax} != {0:''}">
<p class="fax">{address.fax}</p>
</f:if>
<f:if condition="{0:address.email} != {0:''}">
<p class="email"><f:link.email email="{address.email}" /></p>
</f:if>
<f:if condition="{0:address.www} != {0:''}">
<p class="www"><f:link.external uri="{address.www}" target="_blank">{address.www}</f:link.external></p>
</f:if>
</div>
</div>
</div>
<f:if condition="{cycle}">
<div class="clearfix" ></div>
</f:if>
</f:cycle>
</f:for>
<f:if condition="<f:count subject='{rows}' /> % 2">
<div class="clearfix" ></div>
</f:if>
</div>
$this->view = t3lib_div::makeInstance('Tx_Fluid_View_StandaloneView');
$this->view->setTemplatePathAndFilename('typo3conf/ext/yourext/res/template.html');
$this->view->assign('rows', $adresses);
$content = $this->view->render();
return $content;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment