# Conexco Einkaufswelt Artikel 2-spaltig

**URL:** <https://forum.shopware.com/t/conexco-einkaufswelt-artikel-2-spaltig/31354>\
**Category:** Shopware 3.5\
**Tags:** themes--design\
**Created:** [14. Oktober 2015 um 09:16 UTC](https://forum.shopware.com/t/conexco-einkaufswelt-artikel-2-spaltig/31354 "2015-10-14T09:16:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![coarsy](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@coarsy](https://forum.shopware.com/u/coarsy)\
**Post date:** [14. Oktober 2015 um 09:16 UTC](https://forum.shopware.com/t/conexco-einkaufswelt-artikel-2-spaltig/31354/1 "2015-10-14T09:16:23Z")

</div>

Hi und guten Morgen, hat jemand von Euch bereits hinbekommen, dass in der Mobilephone (XS) Ansicht die Artikel 2-spaltig angezeigt werden? Das Problem ist bei nachfolgendem Code zu suchen, da hier jedes

doppelt von der Funktion ausgegeben wird. Wenn es mir gelänge, abzufragen, ob gerade ein Artikelelement kommt, dann wäre mir schon extrem geholfen, da ich dann vor {include file=“widgets/emotion/components/component\_article.tpl”} einfach das entsprechenden DIV mit col-xs-6 setzen könnte. Vielleicht hat ja jemand noch eine Idee… Lieben Dank und viele Grüße, Chris [quote] {function name=draw element=null parent=null} {if $element.type == ‘row’ OR $parent === null}  
{/if} {if $element.type == ‘col’} {if $parent === null} {assign “size” 12} {else} {assign var=“size” value=12 / ($parent.endCol - $parent.startCol + 1) \* ($element.endCol - $element.startCol + 1)} {/if}  
{/if} {foreach $element.elements as $drawElement} {\* Massive calculation \*} {$colWidth = ($drawElement.endCol - $drawElement.startCol) + 1} {$colHeight = ($drawElement.endRow - $drawElement.startRow) + 1} {$drawElementWidth = (($drawElement.endCol - $drawElement.startCol) + 1) \* $cellWidth} {$drawElementHeight = (($drawElement.endRow - $drawElement.startRow) + 1) \* $cellHeight} {$left = ($drawElement.startCol - 1) \* $cellWidth} {$top = ($drawElement.startRow - 1) \* $cellHeight} {$listingTpl = “listing-{$emotion.grid.cols}col”} {$template = $drawElement.component.template} {\* Inner template vars \*} {$Data=$drawElement.data} {$sArticle=$drawElement.data} {$sTemplate=$listingTpl} {$sColWidth=$colWidth} {$sColHeight=$colHeight} {$sElementHeight=$drawElementHeight-$emotion.grid.gutter} {$sElementWidth=$drawElementWidth-$emotion.grid.gutter} {$sCategoryId=$categoryId} {$sController=$Controller} {$sEmotionCols=$emotion.grid.cols} {block name=“widgets/emotion/index/inner-element”} {if $template == ‘component\_article’}  
{include file=“widgets/emotion/components/component\_article.tpl”}  
{elseif $template == ‘component\_article\_slider’} {include file=“widgets/emotion/components/component\_article\_slider.tpl”} {elseif $template == ‘component\_banner’} {include file=“widgets/emotion/components/component\_banner.tpl”} {elseif $template == ‘component\_banner\_slider’} {include file=“widgets/emotion/components/component\_banner\_slider.tpl”} {elseif $template == ‘component\_blog’} {include file=“widgets/emotion/components/component\_blog.tpl”} {elseif $template == ‘component\_category\_teaser’} {include file=“widgets/emotion/components/component\_category\_teaser.tpl”} {elseif $template == ‘component\_html’} {include file=“widgets/emotion/components/component\_html.tpl”} {elseif $template == ‘component\_iframe’} {include file=“widgets/emotion/components/component\_iframe.tpl”} {elseif $template == ‘component\_manufacturer\_slider’} {include file=“widgets/emotion/components/component\_manufacturer\_slider.tpl”} {elseif $template == ‘component\_youtube’} {include file=“widgets/emotion/components/component\_youtube.tpl”} {elseif “widgets/emotion/components/{$template}.tpl”|template\_exists} {include file=“widgets/emotion/components/{$drawElement.component.template}.tpl”} {else} {\* &nbsp; \*} {/if} {/block} {\* Get the last row to compute the final height of the emotion world \*} {if $finalEndRow \< $drawElement.endRow} {$finalEndRow=$drawElement.endRow} {/if} {/foreach} {foreach from=$element.children item=child} {draw element=$child parent=$element} {/foreach} {if $element.type == ‘row’ OR $parent === null}  
{/if} {if $element.type == ‘col’}  
{/if} {/function} {if $swfEmotions|@count \> 0} {foreach $swfEmotions as $emotion} {draw element=$emotion} {/foreach} {/if} [/quote]

---

<div class="post-metadata">

**Author:** ![coarsy](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@coarsy](https://forum.shopware.com/u/coarsy)\
**Post date:** [14. Oktober 2015 um 10:40 UTC](https://forum.shopware.com/t/conexco-einkaufswelt-artikel-2-spaltig/31354/2 "2015-10-14T10:40:06Z")

</div>

Hmmm, das Array sieht so aus, so dass ich doch so an die gewünschte Variable in Smarty kommen müsste: {$element.elements.0.components.name} Liefert ab nullkommanix zurück! ` Array ( [type] =\> col [startRow] =\> 5 [startCol] =\> 0 [endRow] =\> 6 [endCol] =\> 0 [elements] =\> Array ( [2283] =\> Array ( [id] =\> 2283 [emotionId] =\> 1 [componentId] =\> 4 [startRow] =\> 5 [startCol] =\> 0 [endRow] =\> 6 [endCol] =\> 0 [component] =\> Array ( [id] =\> 4 [name] =\> Artikel [convertFunction] =\> getArticle [description] =\> [template] =\> component\_article [cls] =\> article-element [xType] =\> emotion-components-article [pluginId] =\> ) [data] =\> Array ( [objectId] =\> 716e1b8c6cd17b771da77391355749f3 [article] =\> TR-PIRITE-COSM-1 [article\_type] =\> selected\_article [articleID] =\> 409 [articleDetailsID] =\> 2210 [ordernumber] =\> TR-PIRITE-COSM-1 [datum] =\> 2015-07-24 [sales] =\> 0 [highlight] =\> 0 [description] =\> außergewöhnlich verspielte Strumpfhose mit roten Lippen und Herzen [description\_long] =\> außergewöhnlich verspielte Strumpfhose mit roten Lippen und Herzen [supplierName] =\> Trasparenze [supplierImg] =\> media/image/trasparenze\_logo.jpg [articleName] =\> Pirite Strumpfhose [taxID] =\> 1 [price] =\> 21,90 [pseudoprice] =\> 0 [tax] =\> 19.00 [attr1] =\> [attr2] =\> [attr3] =\> [attr4] =\> [attr5] =\> [attr6] =\> [attr7] =\> [attr8] =\> [attr9] =\> [attr10] =\> [attr11] =\> [attr12] =\> [attr13] =\> [attr14] =\> [attr15] =\> [attr16] =\> [attr17] =\> [attr18] =\> [attr19] =\> [attr20] =\> [instock] =\> 6 [weight] =\> 0.000 [shippingtime] =\> [pricegroup] =\> EK [pricegroupID] =\> [pricegroupActive] =\> 0 [filtergroupID] =\> [purchaseunit] =\> [referenceunit] =\> [unitID] =\> [length] =\> 0.000 [height] =\> 0.000 [width] =\> 0.000 [laststock] =\> 1 [additionaltext] =\> cosmetic / 1 [sConfigurator] =\> 1 [esd] =\> 0 [sVoteAverange] =\> Array ( [averange] =\> 0 [count] =\> 0 ) [newArticle] =\> 0 [topseller] =\> 0 [sUpcoming] =\> 0 [sReleasedate] =\> [sVariantArticle] =\> 1 [sReleaseDate] =\> [priceStartingFrom] =\> 0 [sUnit] =\> [referenceprice] =\> [image] =\> Array ( [src] =\> Array ( [original] =\> https://www.meinestruempfe.de/media/image/pirite-strumpfhose-cosmetic-1-2-3-4-1-tr-pirite.jpg [0] =\> https://www.meinestruempfe.de/media/image/thumbnail/pirite-strumpfhose-cosmetic-1-2-3-4-1-tr-pirite\_50x50.jpg [1] =\> https://www.meinestruempfe.de/media/image/thumbnail/pirite-strumpfhose-cosmetic-1-2-3-4-1-tr-pirite\_70x70.jpg [2] =\> https://www.meinestruempfe.de/media/image/thumbnail/pirite-strumpfhose-cosmetic-1-2-3-4-1-tr-pirite\_140x140.jpg [3] =\> https://www.meinestruempfe.de/media/image/thumbnail/pirite-strumpfhose-cosmetic-1-2-3-4-1-tr-pirite\_280x370.jpg [4] =\> https://www.meinestruempfe.de/media/image/thumbnail/pirite-strumpfhose-cosmetic-1-2-3-4-1-tr-pirite\_600x900.jpg [5] =\> https://www.meinestruempfe.de/media/image/thumbnail/pirite-strumpfhose-cosmetic-1-2-3-4-1-tr-pirite\_900x1100.jpg ) [res] =\> Array ( [original] =\> Array ( [width] =\> 0 [height] =\> 0 ) [description] =\> ) [position] =\> 1 [extension] =\> jpg [main] =\> 1 [id] =\> 509 [parentId] =\> [attribute] =\> Array ( ) ) [linkBasket] =\> shopware.php?sViewport=basket&sAdd=TR-PIRITE-COSM-1 [linkDetails] =\> shopware.php?sViewport=detail&sArticle=409 [mode] =\> fix ) [width] =\> 1 [height] =\> 2 ) ) [children] =\> ) `

---

<div class="post-metadata">

**Author:** ![coarsy](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@coarsy](https://forum.shopware.com/u/coarsy)\
**Post date:** [14. Oktober 2015 um 10:59 UTC](https://forum.shopware.com/t/conexco-einkaufswelt-artikel-2-spaltig/31354/3 "2015-10-14T10:59:53Z")

</div>

Dann hatte ich noch das probiert: {$element.elements[components][name]} Geht ebensowenig… Menno!
