Quantcast
Channel: Themes & Design - Shopware Community Forum
Viewing all articles
Browse latest Browse all 1971

smarty snippet in variabel zuweisen

$
0
0

wie zuweisen wir eine snippet in eine smarty variabel?
wie es zbs. mit config möglich ist:

{$showAlsoViewed = {config name=similarViewedShow}}

https://github.com/shopware/shopware/blob/5.2/themes/Frontend/Bare/frontend/detail/index.tpl#L296

foldendes ist leider ne smarty syntax error:

{$myText = false}

{if $foo}
    {$myText = {s namespace="whatever" name="foo"}{/s}}
{elseif $bar}
    {$myText = {s namespace="whatever" name="bar"}}
{/if}
{* hat eigentlich noch mehr ifs *}

{if $myText}
    <haufen html die ich nicht oben duplizieren möchte>
        {$mytext}
    </haufen>
{else}
    {$smarty.block.parent}
{/if}

 


Viewing all articles
Browse latest Browse all 1971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>