Login +

Views / Layout

The Layouts part consists of Templates & Generics.

The tree is as follows:

Templates

Templates are the global templates of View layer. They will include all other XSL files. They define different graphics skeletons of the application. Each Controller / Action is mapped to a template.

The structure of a template is as follows:

  <!--
     - Global template for your application
     - Don't change anything between marked delimiter |||dtd:tagName|||
     - Beyond you can add additional headers or/and xhtml structure
  -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl" xmlns="http://www.w3.org/1999/xhtml">
    <xsl:output method="xml" omit-xml-declaration="yes" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" indent="yes" encoding="||| sls:getCharset|||" />
    
    <!-- Variable Builder -->
    ||| sls:buildUrlVars|||
    <!-- /Variable Builder -->
    
    <!-- Generic include -->
    ||| sls:includeActionFileBody|||
    ||| sls:includeActionFileHeader|||
    ||| sls:includeStaticsFiles|||
    <!-- /Generic include -->
    
    <xsl:template match="root">
        <html xml:lang="||| sls:getLanguage|||" lang="||| sls:getLanguage|||">
            <head>
           
                <!-- Generic headers loading -->
                ||| sls:loadCoreHeaders|||
                ||| sls:loadUserHeaders|||
                ||| sls:loadActionFileHeader|||
                <!-- /Generic headers loading -->
           
            </head>
            <body>
           
                <!-- Generic bodies loading -->
                ||| sls:loadCoreBody|||
                ||| sls:loadUserBody|||
                ||| sls:loadActionFileBody|||
                <!-- /Generic bodies loading -->
               
            </body>
        </html>
    </xsl:template>
</xsl:stylesheet>
  

Generics

The Generics are generic modules XSL redundant in the application. They can be included from any other XSL file. They can represent a single time graphics components on multiple pages. In general, combine with Components of the Controller part to boost their render but they can be totally independent.

The structure of a Generics is as follows:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl" xmlns="http://www.w3.org/1999/xhtml">
    <xsl:template name="Newsletter">
       
    </xsl:template>
</xsl:stylesheet>

Related :