myty ist in der Lage Vorlagen und Vorlagenbausteine (snippets) in der Datenbank zu verwalten. Die Vorlagen können via XML importiert werden. Somit können Projekte schnell und einfach umgesetzt werden. In der Vorlagen XML können neben Basis-Infos zur Vorlage, der Quellcode, Variablen, Scripte und Stylesheet-Definitionen importiert werden.
Vorlagen vom Typ „snippet“ können über das Area-Modul in die Webseiten geladen werden. Vorlagen vom Typ „template“ können als Seiten an neuen Navigationspunkten angelegt werden (HTML/myty-Tag/php) bzw. als Vorlageseiten für das Flashbook-Modul (Flash,myty-Tag/php) oder das Web-to-Print-Modul (XSL-FO, myty-Tag,php).
myty kann Vorlagen folgenden Typs verwalten:
{ nur bei Snippsel
}
<main>
<version>3.3.5</version> (erst ab 3.3.5)
<template>
<information>
<category>News</category>
<project>Newspages</project>
<name>News-Detail-Seite</name>
<description>Diese Vorlage gibt die 5 letzten Newsmeldungen aus der News-DB aus</description>
<author>Mario Mustermann</author>
<preview>/templates/previews/newsliste.jpg</preview>
<tags>News Liste Mitteilungen Aktuelles</tags>
<type>Template</type> (o. Snippet)
</information>
<areas>
<area>
<id>haupt_content</id>
<value>3417</value>
</area>
</areas>
<variables>
<name>hintergrund</name>
<type>text</type>
<description>Hintergrundfarbe</description>
<values>
<value>#666666</value>
<value>#ffffff</value>
</values>
</variables>
<includes>
<inc>/templates/includes/search.inc.php</inc>
</includes>
<code>
<xsl>
<namespaces>
<namespace>fo="http://www.w3.org/1999/XSL/Format"</namespace>
<namespace>axf="http://www.antennahouse.com/names/XSL/Extensions"</namespace>
</namespaces>
<file>Pfad zur Quelltext-Datei ausgehend vom Root-Ordner (optional)</file>
<code>
<![CDATA[
<fo:block-container absolute-position="absolute" overflow="hidden" id="346" left="103.56mm" top="48.22mm" z-index="17" reference-orientation="0" width="86.83mm" height="160.86mm" border="none" >
<fo:block>
<ty:content id="<?php echo $contentIdPrefix; ?>_seite_346" format="xsl" nohtml="true" noEdit="true" label="TXT2" characterStyle="[Keine]" paragraphStyle="[Kein Absatzformat],Fliesstext" paragraphStyleDefault="Fliesstext"><p> Nis eui eu feum volesse quisit vullan vero dit</p></ty:content>
</fo:block>
</fo:block-container>]>
</code>
</xsl>
<html>
<!-- Hier steht der HTM-Code -->
</html>
<flash>
<!-- Hier steht der Flash-Code -->
</flash>
</code>
<styles>
<character-styles>
<classes>
<name>[Kein Absatzformat]</name>
<description></description>
<code>
<css></css>
<xsl>
<![CDATA[
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
<xsl:attribute name="font-style">normal</xsl:attribute>
<xsl:attribute name="font-weight">normal</xsl:attribute>
]]>
</xsl>
<flash>
</flash>
</code>
</classes>
</character-styles>
<paragraph-styles>
<classes>
<name>[Keine]</name>
<description></description>
<code>
<css></css>
<xsl>
<![CDATA[
]]>
</xsl>
<flash>
</flash>
</code>
</classes>
</paragraph-styles>
</styles>
</template>
</main>