$mySmarty

FIXME Language Alert: Unfortunately this page is still in german, please help by translating it.

Das Objekt $mySmarty wird im Skriptcontext zur Verfügung gestellt und regelt den Zugriff auf die Smarty-Template-Engine. Es handelt sich dabei je nach Context um das Smartyobjekt einer Seite(Layout) oder um das Smartyobjekt von Contentobjekten, Includes, Bausteinen oder Extras. Das wird an der jeweiligen Stelle beschrieben.

The object $mySmarty is available in content objects, includes, components and extras.

Mehr Informationen zu Smarty finden sich hier.

You can find more information about smarty at http://smarty.php.net

In den Templates kann die Smartysyntax vollständig genutzt werden. Für Phenotype-Layouts ist dies in der Regel jedoch nicht notwendig.

You can use Smarty in all templates. This is usually not necessary within layouts because all content is pulled in via includes and components.

Der wichtigste Smartytag im Zusammenhang mit Phenotype ist {literal}. Smarty-Tags werden standardmäßig mit geschweiften Klammern gekennzeichnet. Dies kann mit Javascript und CSS kollidieren. Deshalb muss in Layouts, die Javascript und/oder CSS enthalten, der entsprechende Code escaped werden. Dafür ist der literal-Tag gedacht. Beispiel:

The most important smarty tag is {literal}. All smarty tags are written in brackets. This sometimes colides with javascript and CSS. Therefore you have to “escape” CSS and javascript code with the {literal} tag.

{literal}
 
<style>
 
/* TopRow */
 
.top {
 
    background-color: #000000;
 
    color: #FFFFFF;
 
    }
 
</style>
 
{/literal}

You think Phenotype Wiki/Documentation could be better?
We too. Please contribute: Edit this page

Bookmark and Share