Create CSS classes with smarty (from values)

Still not perfect, but if you need classes without playing around with PHP, this could be an easy way.

{assign var="generatedClass" value=$VALUEVARIABLE}
{assign "origin" array('ä', 'ö', 'ü', '+')} // to be continued ...
{assign "replacement" array('ae', 'oe', 'ue', '')} // to be continued ...


Sure, this won´t work well with content that rapidly changes 😉 but in some cases … it might be helpfull.

    Schreibe einen Kommentar

    Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.