Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Smarty: How to fix "unknown modifier 'rewrite'" exception?

After upgrading Shopware from 5.2 to 5.3 the following exception occured:

Smarty: unknown modifier "rewrite"

The error happens in a template-file. Obviously the "rewrite" modifier was removed. How can i substitute it in the template files?

{* Product image - uses the picture element for responsive retina images. *}
<a href="{$sArticle.linkDetails|rewrite:$sArticle.articleName}"
   title="{$sArticle.articleName|escape}"
   class="product--image" style="background-image: url('{if $sArticle.image.thumbnails[1].source}{$sArticle.image.thumbnails[1].source}{else}{link file='frontend/_public/src/img/no-picture.png'}{/if}')">
{*    <div class="product-hover">
        <span>Auge</span>
        <span>Details</span>
    </div>*}
like image 465
delete Avatar asked Jan 29 '23 04:01

delete


1 Answers

Just use {$sArticle.linkDetails} instead of {$sArticle.linkDetails|rewrite:$sArticle.articleName}.
You have to do the same on Listing & Detail page templates.

like image 177
gins t Avatar answered Jan 31 '23 20:01

gins t