delete delete - 3 months ago 78
Smarty Question

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

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download