<{assign var="elements" value=":"|explode:$data.source}> <{assign var="type" value=$elements.0}> <{assign var="id" value=$elements.1}> <{if $type == "C"}> <{assign var="category" value=$webshop->getCategory($id)}> <{if $category}> <{assign var="products" value=$category->getOnlineProducts($data.limit)}> <{/if}> <{elseif $type == "L"}> <{assign var="landing_page" value=$webshop->getLandingPage($id)}> <{if $landing_page}> <{assign var="products" value=$landing_page->getProducts($data.limit)}> <{/if}> <{/if}> <{if $products}> <{if $size > 4}>

### <{$data.headline|escape}>

<{section name="i" loop=$products}> <{assign var="images" value=$products[i]->getImages()}>
- <{if $products[i]->getSalePrice()}>
  UDSALG
  <{/if}>
  <{if $images}> <{else}> <{/if}>
  <{if $images[1]}> <{elseif $images[0]}> <{else}> <{/if}>
  Se produkt
  <{* <{$products[i]->getMainCategoryName()|escape}> *}>

  ##### <{$products[i]->getName()|escape|truncate:19:"...":true}>

  <{$products[i]->getRealPrice()|number_format:2:",":"."}> <{$webshop->getCurrency()}>
<{/section}>

<{elseif $size > 2}>

### <{$data.headline|escape}>

<{section name="i" loop=$products}> <{assign var="image" value=$products[i]->getImage()}>
- <{if $image}> <{else}> <{/if}>
  <{$products[i]->getName()|escape}> <{$products[i]->getRealPrice()|number_format:2:",":"."}> <{$webshop->getCurrency()}> <{assign var="rating" value=$products[i]->getAvgRating()}> <{assign var="star_class" value="one"}> <{if $rating > 4}> <{assign var="star_class" value="five"}> <{elseif $rating > 3}> <{assign var="star_class" value="four"}> <{elseif $rating > 2}> <{assign var="star_class" value="three"}> <{elseif $rating > 1}> <{assign var="star_class" value="two"}> <{elseif $rating > 0}> <{assign var="star_class" value="one"}> <{/if}>
<{/section}>

<{else}>

<{section name="i" loop=$products}>
  <{$products[i]->getName()|escape}>
<{/section}>

<{/if}> <{/if}>