<{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}>

		<div class="products">
			<div class="row">

				<{section name="i" loop=$products}>

					<div class="col-md-<{$data.size|default:4}> shop">
						<{include file="inner-product.html" product=$products[i]}>
					</div>

				<{/section}>

			</div>
		</div>

	<{elseif $size > 2}>

		<!-- Headline -->
		<h3 class="headline"><{$data.headline|escape}></h3>
		<span class="line margin-bottom-0"></span>
		<div class="clearfix"></div>

		<ul class="product-list">

			<{section name="i" loop=$products}>
				<{assign var="image" value=$products[i]->getImage()}>

				<li><a href="<{$products[i]->getRemoteUrl()|escape}>">
					<{if $image}>
						<img src="<{$image->getSrc(80, 80, 'box')}>" alt="" />
					<{else}>
						<img src="images/small_product_list_09.jpg" alt="" />
					<{/if}>

					<div class="product-list-desc"><{$products[i]->getName()|escape}>
						<i><{$products[i]->getRealPrice()|number_format:2:",":"."}> <{$webshop->getCurrency()}></i>

						<{include file="ratings.html" rating=$products[i]->getAvgRating()}>
					</div>
				</a></li>

			<{/section}>

			<li><div class="clearfix"></div></li>

		</ul>

	<{else}>

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

	<{/if}>


<{/if}>