<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://docs.instantcms.ru/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://docs.instantcms.ru/feed.php">
        <title>Документация InstantCMS - en:dev:templates</title>
        <description>для администраторов и разработчиков</description>
        <link>https://docs.instantcms.ru/</link>
        <image rdf:resource="https://docs.instantcms.ru/_media/wiki/dokuwiki.svg" />
       <dc:date>2026-11-19T02:45:58+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://docs.instantcms.ru/en/dev/templates/css-js?rev=1490099695"/>
                <rdf:li rdf:resource="https://docs.instantcms.ru/en/dev/templates/helpers?rev=1490012006"/>
                <rdf:li rdf:resource="https://docs.instantcms.ru/en/dev/templates/inherits?rev=1490304946"/>
                <rdf:li rdf:resource="https://docs.instantcms.ru/en/dev/templates/layouts?rev=1499429360"/>
                <rdf:li rdf:resource="https://docs.instantcms.ru/en/dev/templates/options?rev=1489871888"/>
                <rdf:li rdf:resource="https://docs.instantcms.ru/en/dev/templates/overview?rev=1489866599"/>
                <rdf:li rdf:resource="https://docs.instantcms.ru/en/dev/templates/page-params?rev=1490171061"/>
                <rdf:li rdf:resource="https://docs.instantcms.ru/en/dev/templates/scheme?rev=1489960251"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://docs.instantcms.ru/_media/wiki/dokuwiki.svg">
        <title>Документация InstantCMS</title>
        <link>https://docs.instantcms.ru/</link>
        <url>https://docs.instantcms.ru/_media/wiki/dokuwiki.svg</url>
    </image>
    <item rdf:about="https://docs.instantcms.ru/en/dev/templates/css-js?rev=1490099695">
        <dc:format>text/html</dc:format>
        <dc:date>2017-03-21T12:34:55+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Linking CSS and Javascript files</title>
        <link>https://docs.instantcms.ru/en/dev/templates/css-js?rev=1490099695</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;linking-css-and-javascript-files&quot;&gt;Linking CSS and Javascript files&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Linking CSS and Javascript files&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;linking-css-and-javascript-files&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-48&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
All &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; and JavaScript files in the templates has to be linked via special methods (functions). Accordingly, all &lt;a href=&quot;https://docs.instantcms.ru/en/manual/settings/global#вкладка-интерфейс&quot; class=&quot;wikilink1&quot; title=&quot;en:manual:settings:global&quot; data-wiki-id=&quot;en:manual:settings:global&quot;&gt;Compression Options&lt;/a&gt; will be taken into account and the possibility of duplicate linking of the same files will be eliminated.
&lt;/p&gt;

&lt;p&gt;
It is worth noting that the paths to the files in all listed methods need to be linked &lt;strong&gt;without&lt;/strong&gt; the initial slash and relative to the InstantCMS file tree root. However, it is also worth mentioning that if you are going to link inherited templates later, the path to the linked files should be formed via special methods.
&lt;/p&gt;

&lt;p&gt;
All templates are linked in the methods (functions) of the &lt;code&gt;cmsTemplate&lt;/code&gt; template engine class, that is why the &lt;code&gt;$this&lt;/code&gt; context is available in each template. The objects of other &lt;a href=&quot;https://docs.instantcms.ru/en/dev/core&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:core&quot; data-wiki-id=&quot;en:dev:core&quot;&gt;system classes&lt;/a&gt; are available either via the controller property of the template (for example, &lt;code&gt;$this→controller→cms_user&lt;/code&gt;, according to &lt;a href=&quot;https://docs.instantcms.ru/en/dev/controllers/core&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:controllers:core&quot; data-wiki-id=&quot;en:dev:controllers:core&quot;&gt;the work with system classes and objects&lt;/a&gt;), or via explicitly declared objects (for example, &lt;code&gt;$core  = cmsCore::getInstance();&lt;/code&gt;).
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Introduction&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;introduction&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;49-1208&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;linking-css-files&quot;&gt;Linking CSS files&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
The main &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; file of a controller, if there is one at the path &lt;code&gt;/templates/TEMPLATE_TITLE/controllers/CONTROLLER_TITLE/styles.css&lt;/code&gt;, is linked automatically, you just need to create it.
&lt;/p&gt;

&lt;p&gt;
The following methods of &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; linking are available in the template:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getCSSTag&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path_to_file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Returns the &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; file’s &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; linking code. There is one parameter to which the file path is passed. This method does nothing but returns the &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; linking code.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;insertCSS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path_to_file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Types the &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; file’s &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; linking code. There is one parameter to which the file path is passed. This method does nothing but outputs the &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; linking code. The main difference from the &lt;code&gt;$this→getCSSTag($path_to_file);&lt;/code&gt; method is that the &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; linking code is typed at once. The files that are linked in this way &lt;strong&gt;do not participate&lt;/strong&gt; in compression and minification of &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; files.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addMainCSS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path_to_file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Adds the &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; file to the head section of the page above other references to &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; styles. The files that are linked in this way participate in compression and minification of &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; files.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addCSS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path_to_file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$allow_merge&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Adds the &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; file to the end of the list of references to &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; styles. The files that are linked in this way participate in compression and minification of &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; files, if the $allow_merge second parameter is specified in true (default behaviour).
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addControllerCSS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$cname&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$allow_merge&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Searches for a &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; file at the path &lt;code&gt;/templates/TEMPLATE_TITLE/controllers/{$cname}/css/{$path}.css&lt;/code&gt; and links it to the end of the list of references to &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; styles, if finds. The files that are linked in this way participate in compression and minification of &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; files, if the $allow_merge third parameter is specified in true (default behaviour).
The controller’s title is specified in the $cname variable. If it is not passed, the current context’s controller is used.
&lt;/p&gt;

&lt;p&gt;
The method searches for a specified file in the currently selected template first, if it does not find, the one that is located at the similar path of the default template is linked.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addCSSFromContext&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path_to_file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Depending on the request context, this method either executes the &lt;code&gt;$this→insertCSS($path_to_file);&lt;/code&gt; method (in case of an AJAX request), or executes the &lt;code&gt;$this→addCSS($path_to_file, $allow_merge);&lt;/code&gt; method (in case of an ordinary request).
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Linking CSS files&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;linking-css-files&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;1209-3740&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;linking-javascript-files&quot;&gt;Linking JavaScript files&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
The following methods of linking JavaScript files are available in the template:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getJSTag&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path_to_file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$comment&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Returns the JavaScript file’s &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; linking code. The path to the file is passed to the $path_to_file parameter, you can comment the reference in the $comment parameter. This method does nothing but returns the &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; linking code.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;insertJS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path_to_file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$comment&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Types the JavaScript file’s &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; linking code. This method does nothing but outputs the &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; linking code. The main difference of the &lt;code&gt;$this→getJSTag($path_to_file, $comment);&lt;/code&gt; method is that the &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; linking code is typed at once. The files that are linked in this way &lt;strong&gt;do nor participate&lt;/strong&gt; in compression and minification of JavaScript files.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addMainJS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path_to_file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$comment&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Adds the JavaScript file to the head section of the page above other references to JavaScript files. The files that are linked in this way participate in compression and minification of JavaScript files.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addJS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path_to_file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$comment&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$allow_merge&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Adds the JavaScript file to the end of the list of references to JavaScript files. The files that are linked in this way participate in compression and minification of JavaScript files, if the $allow_merge third parameter is specified in true (default behaviour).
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addControllerJS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$cname&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$comment&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$allow_merge&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Searches for a JavaScript file at the path &lt;code&gt;/templates/TEMPLATE_TITLE/controllers/{$cname}/js/{$path}.js&lt;/code&gt; and links it to the end of the list of references to JavaScript files, if finds. The files that are linked in this way participate in compression and minification of JavaScript files, if the $allow_merge fourth parameter is specified in true (default behaviour).
The controller’s title is specified in the $cname variable. If it is not passed, the current context’s controller is used.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addJSFromContext&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path_to_file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$comment&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Depending on the context request, this method either executes the &lt;code&gt;$this→insertJS($path_to_file, $comment);&lt;/code&gt; method (in case of an AJAX request) or executes the &lt;code&gt;$this→addJS($path_to_file, $comment, $allow_merge);&lt;/code&gt; method (in case of an ordinary request).
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getLangJS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$phrases&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
This method does not link any files and will be helpful to output the language constants in a convenient way. To the $phrases parameter you can pass:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Language constant title;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; An array of language constant titles;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Specify an unlimited number of incoming parameters of the method where each parameter is the constant’s title.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Please note that you should pass not the constant (i.e. something that is stored in it) but its title, for example:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&amp;lt;script&amp;gt;
    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getLangJS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'LANG_CP_WIDGET_DELETE_CONFIRM'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'LANG_HIDE'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'LANG_SHOW'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;p&gt;
this will be equal to the following:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&amp;lt;script&amp;gt;
    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getLangJS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'LANG_CP_WIDGET_DELETE_CONFIRM'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'LANG_HIDE'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'LANG_SHOW'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;p&gt;
On the page, the result will be the following:
&lt;/p&gt;
&lt;pre class=&quot;code JavaScript&quot;&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;var&lt;/span&gt; LANG_CP_WIDGET_DELETE_CONFIRM &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Delete widget?'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;var&lt;/span&gt; LANG_HIDE &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Hide'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;var&lt;/span&gt; LANG_SHOW &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Show'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;script&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;hr /&gt;

&lt;p&gt;
&lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates&quot; data-wiki-id=&quot;en:dev:templates&quot;&gt;Back to Section Contents&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Linking JavaScript files&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;linking-javascript-files&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:6,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;3741-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="https://docs.instantcms.ru/en/dev/templates/helpers?rev=1490012006">
        <dc:format>text/html</dc:format>
        <dc:date>2017-03-20T12:13:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Using Helper Functions</title>
        <link>https://docs.instantcms.ru/en/dev/templates/helpers?rev=1490012006</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;using-helper-functions&quot;&gt;Using Helper Functions&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
The engine has a file containg a set of functions that make the «life» of layout designers and people working with InstantCMS templates easier and make the work with templates convenient. The functions in this file, as a rule, return a certain string containing &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; code. For example, the &lt;code&gt;html_link&lt;/code&gt; function types the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; tag with the parameters passed to the function making the attributes safe from XSS.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Using Helper Functions&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;using-helper-functions&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-459&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;a-file-with-default-helper-functions&quot;&gt;A file with default helper functions&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
The file where all these functions are defined is located at &lt;code&gt;/system/libs/template.helper.php&lt;/code&gt;. It is linked whenever a similar custom file is not specified for the template.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;A file with default helper functions&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;a-file-with-default-helper-functions&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;460-688&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;creating-a-custom-file-with-helper-functions&quot;&gt;Creating a custom file with helper functions&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
If, in your template, you want to edit the data returned by these functions, for example, to force add classes to the tags or change the layout of relevant blocks, you should:
&lt;/p&gt;
&lt;ol&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Copy the &lt;code&gt;/system/libs/template.helper.php&lt;/code&gt; file into &lt;code&gt;/templates/YOUR_TEMPLATE/assets/helper.php&lt;/code&gt;, i.e. copy the default file into &lt;code&gt;/templates/YOUR_TEMPLATE/assets/&lt;/code&gt; and rename it into &lt;code&gt;helper.php&lt;/code&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Edit at your discretion but leave the main logic of the functions unchanged.&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;
&lt;strong&gt;It is important to understand&lt;/strong&gt; that ALL functions initially available in &lt;code&gt;/system/libs/template.helper.php&lt;/code&gt; should be defined in the &lt;code&gt;/templates/YOUR_TEMPLATE/assets/helper.php&lt;/code&gt; file, even if you edit only one function. However, you can certainly add custom helper functions and use them in your template.
&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;
&lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates/helpers/list&quot; class=&quot;wikilink2&quot; title=&quot;en:dev:templates:helpers:list&quot; rel=&quot;nofollow&quot; data-wiki-id=&quot;en:dev:templates:helpers:list&quot;&gt;Go to helper function description&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates&quot; data-wiki-id=&quot;en:dev:templates&quot;&gt;Back to Section Contents&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Creating a custom file with helper functions&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;creating-a-custom-file-with-helper-functions&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;689-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="https://docs.instantcms.ru/en/dev/templates/inherits?rev=1490304946">
        <dc:format>text/html</dc:format>
        <dc:date>2017-03-23T21:35:46+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Inheritance mechanism of templates</title>
        <link>https://docs.instantcms.ru/en/dev/templates/inherits?rev=1490304946</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;inheritance-mechanism-of-templates&quot;&gt;Inheritance mechanism of templates&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
As mentioned in the  &lt;a href=&quot;https://docs.instantcms.ru/dev/templates/overview&quot; class=&quot;wikilink1&quot; title=&quot;dev:templates:overview&quot; data-wiki-id=&quot;dev:templates:overview&quot;&gt;Introduction&lt;/a&gt;, the engine links the template files, css and javascript files along the chain. At minimum, this chain consists of «your theme» ⇒«default theme». So there is no need to copy the unchanged template files from the “default” theme to your theme.
&lt;/p&gt;

&lt;p&gt;
Suppose, your theme is called &lt;code&gt;my_best_template&lt;/code&gt;. The engine asks to use a relative path (&lt;em&gt;path from the root of the theme&lt;/em&gt;) to reference the template file - &lt;code&gt;controllers/content/category_view.tpl.php&lt;/code&gt;. This file is firstly searched at the path &lt;strong&gt;/templates/my_best_template/&lt;/strong&gt;controllers/content/category_view.tpl.php, if there isn’t one there, the &lt;strong&gt;/templates/default/&lt;/strong&gt;controllers/content/category_view.tpl.php file is linked. Such behaviour is characteristic of the simplest case of referencing.
&lt;/p&gt;

&lt;p&gt;
Let’s now suppose you have already created the main &lt;code&gt;my_best_template&lt;/code&gt; theme and want to customize it slightly under another title. For this, a new theme is created, for instance, &lt;code&gt;new_my_best_template&lt;/code&gt;. You edit, for example, its &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; styles and/or the main layout of the page and specify that this theme should be inherited from the &lt;code&gt;my_best_template&lt;/code&gt; theme. To enable the inheritance mechanism, in the root directory of the theme, you have to create the inherit.php file in which the array of a chain of templates should be returned, except for the main template (&lt;code&gt;new_my_best_template&lt;/code&gt;) and the &lt;code&gt;default&lt;/code&gt; template.
So according to our example we will create the file at the path &lt;code&gt;/templates/new_my_best_template/inherit.php&lt;/code&gt;, the file’s contents will be as follows: 
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;
    &lt;span class=&quot;st_h&quot;&gt;'my_best_template'&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
If you need to have several inherited themes in a chain, enter the titles in the order from the default theme, i.e. from lowest to highest priority. 
As a result, in this example, the engine will check as follows:
&lt;/p&gt;
&lt;ol&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; File’s availability is checked at the path &lt;strong&gt;/templates/new_my_best_template/&lt;/strong&gt;controllers/content/category_view.tpl.php. If the file is found, it is linked at once.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; File’s availability is checked at the path &lt;strong&gt;/templates/my_best_template/&lt;/strong&gt;controllers/content/category_view.tpl.php. If the file is found, it is linked at once.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; And finally, if the file is not found, &lt;strong&gt;/templates/default/&lt;/strong&gt;controllers/content/category_view.tpl.php is linked.&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;
Herewith, if the file is not available in the default theme either, the &lt;abbr title=&quot;Content Management System&quot;&gt;CMS&lt;/abbr&gt; will show an error and will terminate the work.
&lt;/p&gt;

&lt;p&gt;
Inheritance extends to the &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt;/JS files too, if they were linked via &lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates/css-js&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates:css-js&quot; data-wiki-id=&quot;en:dev:templates:css-js&quot;&gt;Special Methods&lt;/a&gt;. If you do not want to create inherited themes in the future, in the main &lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates/layouts&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates:layouts&quot; data-wiki-id=&quot;en:dev:templates:layouts&quot;&gt;Template Layout&lt;/a&gt;, you should link the possible replaceable files of styles and/or javascript files via &lt;code&gt;$this→getTplFilePath()&lt;/code&gt;, &lt;code&gt;$this→getStylesFileName()&lt;/code&gt; and &lt;code&gt;$this→getJavascriptFileName()&lt;/code&gt; methods.
&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;
&lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates&quot; data-wiki-id=&quot;en:dev:templates&quot;&gt;Back to Section Contents&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
</description>
    </item>
    <item rdf:about="https://docs.instantcms.ru/en/dev/templates/layouts?rev=1499429360">
        <dc:format>text/html</dc:format>
        <dc:date>2017-07-07T12:09:20+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Template Layouts</title>
        <link>https://docs.instantcms.ru/en/dev/templates/layouts?rev=1499429360</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;template-layouts&quot;&gt;Template Layouts&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
An InstantCMS template, as a common entity (synonyms - theme, skin), consists of a common layout (there can be more than one) and output files-templates.
&lt;/p&gt;

&lt;p&gt;
A common layout is the main template of all site pages and contains the &amp;lt;html&amp;gt;, &amp;lt;head&amp;gt; and &amp;lt;body&amp;gt; tags. The templates of components and widgets are output inside it. By default, the engine uses two layouts: main.tpl.php for the site and admin.tpl.php for the Control panel.
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; /templates/default/main.tpl.php&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; /templates/default/admin.tpl.php&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Template Layouts&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;template-layouts&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-536&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;layout-markup&quot;&gt;Layout Markup&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
When creating a layout markup, you create a basic frame for your theme. Let’s consider an example. The simplest layout can be as follows:
&lt;/p&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://docs.instantcms.ru/_export/code/en/dev/templates/layouts?codeblock=0&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;main.tpl.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file php&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;HTML&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/title&amp;gt;
    &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot;&amp;gt;
    &amp;lt;meta name=&amp;quot;viewport&amp;quot; content=&amp;quot;width=device-width, initial-scale=1.0&amp;quot;&amp;gt;
    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addMainCSS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;templates/&lt;span class=&quot;es4&quot;&gt;{$this-&amp;gt;name}&lt;/span&gt;/css/theme-layout.css&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addMainCSS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;templates/&lt;span class=&quot;es4&quot;&gt;{$this-&amp;gt;name}&lt;/span&gt;/css/theme-modal.css&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addMainJS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;templates/&lt;span class=&quot;es4&quot;&gt;{$this-&amp;gt;name}&lt;/span&gt;/js/jquery.js&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addMainJS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;templates/&lt;span class=&quot;es4&quot;&gt;{$this-&amp;gt;name}&lt;/span&gt;/js/jquery-modal.js&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addMainJS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;templates/&lt;span class=&quot;es4&quot;&gt;{$this-&amp;gt;name}&lt;/span&gt;/js/core.js&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addMainJS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;templates/&lt;span class=&quot;es4&quot;&gt;{$this-&amp;gt;name}&lt;/span&gt;/js/modal.js&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;cmsUser&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;isLogged&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addMainJS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;templates/&lt;span class=&quot;es4&quot;&gt;{$this-&amp;gt;name}&lt;/span&gt;/js/messages.js&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
&amp;lt;/head&amp;gt;
&amp;lt;body id=&amp;quot;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$device_type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;_device_type&amp;quot;&amp;gt;
    &amp;lt;div id=&amp;quot;layout&amp;quot;&amp;gt;
        &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;site_config&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;is_site_on&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
            &amp;lt;div id=&amp;quot;site_off_notice&amp;quot;&amp;gt;
                &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;a href=&quot;http://www.php.net/printf&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ERR_SITE_OFFLINE_FULL&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; href_to&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'admin'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'settings'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'siteon'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
            &amp;lt;/div&amp;gt;
        &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
        &amp;lt;header&amp;gt;
            &amp;lt;div class=&amp;quot;widget_ajax_wrap&amp;quot; id=&amp;quot;widget_pos_header&amp;quot;&amp;gt;
                &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;widgets&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'header'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'wrapper_plain'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/header&amp;gt;
        &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;hasWidgetsOn&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'top'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
            &amp;lt;nav&amp;gt;
                &amp;lt;div class=&amp;quot;widget_ajax_wrap&amp;quot; id=&amp;quot;widget_pos_top&amp;quot;&amp;gt;
                    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;widgets&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'top'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'wrapper_plain'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/nav&amp;gt;
        &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
        &amp;lt;div id=&amp;quot;body&amp;quot;&amp;gt;
            &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$messages&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; cmsUser&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;getSessionMessages&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$messages&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                    &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                    &amp;lt;div class=&amp;quot;sess_messages&amp;quot;&amp;gt;
                        &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
                            &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$messages&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$message&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                                &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$message&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
                        &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                    &amp;lt;/div&amp;gt;
                    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
            &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
            &amp;lt;section&amp;gt;
                &amp;lt;div class=&amp;quot;widget_ajax_wrap&amp;quot; id=&amp;quot;widget_pos_left-top&amp;quot;&amp;gt;
                    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;widgets&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'left-top'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                &amp;lt;/div&amp;gt;
                &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;isBody&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                    &amp;lt;article&amp;gt;
                        &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;site_config&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;show_breadcrumbs&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$core&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;uri&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;isBreadcrumbs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                            &amp;lt;div id=&amp;quot;breadcrumbs&amp;quot;&amp;gt;
                                &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;breadcrumbs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'strip_last'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                            &amp;lt;/div&amp;gt;
                        &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                        &amp;lt;div id=&amp;quot;controller_wrap&amp;quot;&amp;gt;
                            &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                        &amp;lt;/div&amp;gt;
                    &amp;lt;/article&amp;gt;
                &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                &amp;lt;div class=&amp;quot;widget_ajax_wrap&amp;quot; id=&amp;quot;widget_pos_left-bottom&amp;quot;&amp;gt;
                    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;widgets&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'left-bottom'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/section&amp;gt;
            &amp;lt;aside&amp;gt;
                &amp;lt;div class=&amp;quot;widget_ajax_wrap&amp;quot; id=&amp;quot;widget_pos_right-top&amp;quot;&amp;gt;
                    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;widgets&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'right-top'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;div class=&amp;quot;widget_ajax_wrap&amp;quot; id=&amp;quot;widget_pos_right-center&amp;quot;&amp;gt;
                    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;widgets&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'right-center'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;div class=&amp;quot;widget_ajax_wrap&amp;quot; id=&amp;quot;widget_pos_right-bottom&amp;quot;&amp;gt;
                    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;widgets&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'right-bottom'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/aside&amp;gt;
&amp;nbsp;
        &amp;lt;/div&amp;gt;
        &amp;lt;footer&amp;gt;
            &amp;lt;ul&amp;gt;
                &amp;lt;li id=&amp;quot;info&amp;quot;&amp;gt;
                    &amp;lt;span class=&amp;quot;item&amp;quot;&amp;gt;
                        &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; LANG_POWERED_BY_INSTANTCMS&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                    &amp;lt;/span&amp;gt;
                    &amp;lt;span class=&amp;quot;item&amp;quot;&amp;gt;
                        &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; LANG_ICONS_BY_FATCOW&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                    &amp;lt;/span&amp;gt;
                &amp;lt;/li&amp;gt;
                &amp;lt;li id=&amp;quot;nav&amp;quot;&amp;gt;
                    &amp;lt;div class=&amp;quot;widget_ajax_wrap&amp;quot; id=&amp;quot;widget_pos_footer&amp;quot;&amp;gt;
                        &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;widgets&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'footer'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'wrapper_plain'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                    &amp;lt;/div&amp;gt;
                &amp;lt;/li&amp;gt;
            &amp;lt;/ul&amp;gt;
        &amp;lt;/footer&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/HTML&amp;gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;p&gt;
The file should be encoded in UTF-8.
&lt;/p&gt;

&lt;p&gt;
Here is the default simplified template markup for InstantCMS. In this file, all methods of the cmsTemplate class object are available via $this.
&lt;/p&gt;

&lt;p&gt;
As we see, this layout contains the frame of basic (and possible) blocks of all site pages. Let’s consider in detail.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Layout Markup&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;layout-markup&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;537-5259&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit3&quot; id=&quot;head-block&quot;&gt;&amp;lt;head&amp;gt; block&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
The main parameters of pages are output here: title, linked styles and scripts, meta tags.
&lt;/p&gt;

&lt;p&gt;
The &lt;strong&gt;$this→title();&lt;/strong&gt; method outputs the page title set by a controller.
&lt;/p&gt;

&lt;p&gt;
The &lt;strong&gt;$this→head();&lt;/strong&gt; method outputs all head tags that are specified for the page with the help of the corresponding methods of linking of &lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates/css-js&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates:css-js&quot; data-wiki-id=&quot;en:dev:templates:css-js&quot;&gt;CSS, JavaScript&lt;/a&gt; and &lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates/page-params&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates:page-params&quot; data-wiki-id=&quot;en:dev:templates:page-params&quot;&gt;other tags&lt;/a&gt;. To link anything you need, use them above the current method’s request. It is important to link via engine methods, in this case, your linked styles and/or scripts will participate in compression and minification according to the &lt;a href=&quot;https://docs.instantcms.ru/en/manual/settings/global&quot; class=&quot;wikilink1&quot; title=&quot;en:manual:settings:global&quot; data-wiki-id=&quot;en:manual:settings:global&quot;&gt;CMS Options&lt;/a&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;lt;head&amp;gt; block&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;head-block&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;5260-5963&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit4&quot; id=&quot;device_type-variable&quot;&gt;$device_type variable&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
This variable may contain three values: desktop, mobile, tablet. This will conditionally indicate a device from which a user accessed the site. &lt;strong&gt;desktop&lt;/strong&gt; - desktop users, &lt;strong&gt;mobile&lt;/strong&gt; - mobile device users, &lt;strong&gt;tablet&lt;/strong&gt; - tablet users.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;$device_type variable&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;device_type-variable&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;5964-6231&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit5&quot; id=&quot;this-site_config-variable&quot;&gt;$this-&amp;gt;site_config variable&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
This is an array of general site settings. It is usually used to check if the site or debugging is enabled, accordingly, it is used to display relevant messages.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;$this-&amp;gt;site_config variable&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;this-site_config-variable&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;6232-6433&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit6&quot; id=&quot;widget-output&quot;&gt;Widget output&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
As we know, widgets are &lt;a href=&quot;https://docs.instantcms.ru/en/manual/widgets&quot; class=&quot;wikilink1&quot; title=&quot;en:manual:widgets&quot; data-wiki-id=&quot;en:manual:widgets&quot;&gt;Information Blocks&lt;/a&gt; on different pages. Learn about custom widget development on &lt;a href=&quot;https://docs.instantcms.ru/en/dev/widgets&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:widgets&quot; data-wiki-id=&quot;en:dev:widgets&quot;&gt;this page&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
In the page layout context, there are two important methods for widgets: 
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;code&gt;$this→hasWidgetsOn(&amp;#039;position&amp;#039;);&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;code&gt;$this→widgets(&amp;#039;position&amp;#039;);&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
The &lt;strong&gt;hasWidgetsOn&lt;/strong&gt; method helps to detect enabled widgets at a position or positions and for the &lt;a href=&quot;https://docs.instantcms.ru/en/manual/widgets/pages&quot; class=&quot;wikilink1&quot; title=&quot;en:manual:widgets:pages&quot; data-wiki-id=&quot;en:manual:widgets:pages&quot;&gt;Current Page&lt;/a&gt;.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$has_top&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;hasWidgetsOn&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'top_position'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// will return true, if at least one widget at this position and for the current page is available for output&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
To the method, you can pass several positions separated by commas:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$has_top&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;hasWidgetsOn&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'top_center'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'top_right'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// will return true, if at least one widget is available for output at one of the two positions&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
The &lt;strong&gt;widgets&lt;/strong&gt; method types all widgets at this position. The method has three parameters:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;widgets&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'position'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$is_titles&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$wrapper&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Use the second and the third parameters to show or hide the widget title and the title of a widget wrapper correspondingly. These parameters will overlap similar parameters &lt;a href=&quot;https://docs.instantcms.ru/en/dev/widgets&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:widgets&quot; data-wiki-id=&quot;en:dev:widgets&quot;&gt;specified in the widget&lt;/a&gt;. For example, write the following, if you want to hide the titles of widgets at this position and use wrapper_plain.tpl.php as a template:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;widgets&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'position'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'wrapper_plain'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Widget output&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;widget-output&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:6,&amp;quot;range&amp;quot;:&amp;quot;6434-7925&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit7&quot; id=&quot;output-of-information-messages&quot;&gt;Output of information messages&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Information messages are messages about successful operations, information messages and error messages, for example, about errors in a form. Insert the following code in any part of the template to output them:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// we get all messages&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$messages&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; cmsUser&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;getSessionMessages&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// if there are messages&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$messages&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
    &amp;lt;div class=&amp;quot;sess_messages&amp;quot;&amp;gt;
        &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;// we sort and output them&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$messages&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$message&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$message&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
    &amp;lt;/div&amp;gt;
&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Output of information messages&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;output-of-information-messages&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:5,&amp;quot;secid&amp;quot;:7,&amp;quot;range&amp;quot;:&amp;quot;7926-8521&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit8&quot; id=&quot;breadcrumbs-output&quot;&gt;&amp;quot;Breadcrumbs&amp;quot; output&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Breadcrumbs - a navigation element through site sections showing a path from the root directory to the page currently viewed by a user.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://docs.instantcms.ru/_detail/dev/templates/breadcrumbs.png?id=en%3Adev%3Atemplates%3Alayouts&quot; class=&quot;media&quot; title=&quot;dev:templates:breadcrumbs.png&quot;&gt;&lt;img src=&quot;https://docs.instantcms.ru/_media/dev/templates/breadcrumbs.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;site_config&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;show_breadcrumbs&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$core&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;uri&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;isBreadcrumbs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
	&amp;lt;div id=&amp;quot;breadcrumbs&amp;quot;&amp;gt;
		&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;breadcrumbs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'strip_last'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
	&amp;lt;/div&amp;gt;
&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
In this construction, we check if breadcrumbs are enabled in the settings &lt;code&gt;$this→site_config→show_breadcrumbs&lt;/code&gt;, we are not on the main page &lt;code&gt;$core→uri&lt;/code&gt; and breadcrumbs are not empty &lt;code&gt;$this→isBreadcrumbs()&lt;/code&gt;.  If the conditions are met, we output the panel.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;breadcrumbs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'strip_last'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
An array of settings is passed to the method’s parameter, the default options are as follows:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;
    &lt;span class=&quot;st_h&quot;&gt;'home_url'&lt;/span&gt;   &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; href_to_home&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// main page url&lt;/span&gt;
    &lt;span class=&quot;st_h&quot;&gt;'template'&lt;/span&gt;   &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'breadcrumbs'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;// a template in which the HTML-layout of breadcrumbs is generated&lt;/span&gt;
    &lt;span class=&quot;st_h&quot;&gt;'strip_last'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;            &lt;span class=&quot;co1&quot;&gt;// Check to hide the last element of the chain&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
By default, the breadcrumbs generation template is found at the path &lt;code&gt;/templates/default/assets/ui/breadcrumbs.tpl.php&lt;/code&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\&amp;quot;Breadcrumbs\&amp;quot; output&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;breadcrumbs-output&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:6,&amp;quot;secid&amp;quot;:8,&amp;quot;range&amp;quot;:&amp;quot;8522-9766&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit9&quot; id=&quot;page-body-output&quot;&gt;Page body output&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
The &lt;strong&gt;$this→body();&lt;/strong&gt; method types the page’s «body», i.e. the results of the current component’s work. At the moment of output, the body is already generated .
&lt;/p&gt;

&lt;p&gt;
The &lt;strong&gt;$this→isBody()&lt;/strong&gt; method checks if there is anything to output on the page.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Page body output&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;page-body-output&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:9,&amp;quot;secid&amp;quot;:9,&amp;quot;range&amp;quot;:&amp;quot;9767-10044&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit10&quot; id=&quot;language-constants&quot;&gt;Language constants&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
If a template has a custom language file, all its constants are available in the layout. The language file can be located at the path &lt;code&gt;/system/languages/LANGUAGE/templates/TEMPLATE_TITLE.php&lt;/code&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Language constants&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;language-constants&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:9,&amp;quot;secid&amp;quot;:10,&amp;quot;range&amp;quot;:&amp;quot;10045-10271&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit11&quot; id=&quot;customizing-an-output-layout&quot;&gt;Customizing an Output Layout&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
The layout is switched in the component’s controller in the following way:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;cmsTemplate&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;getInstance&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setLayout&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'admin'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
or so, which is equivalent or preferable if this action is performed in the controller’s context:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;cms_template&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setLayout&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'admin'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
The &lt;strong&gt;setLayout($layout_name)&lt;/strong&gt; method switches the layout for the current request. 
&lt;/p&gt;

&lt;p&gt;
If a component uses a custom layout (or several layouts), when switching a theme, a new theme should contain the same name layouts, otherwise, the component will be incompetible with the thеme.
&lt;/p&gt;

&lt;p&gt;
Learn custom layout’s title in the following way:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$current_layout&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;cms_template&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getLayout&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
The &lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates/inherits&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates:inherits&quot; data-wiki-id=&quot;en:dev:templates:inherits&quot;&gt;Inheritance Mechanism&lt;/a&gt; is applicable to the layout files too.
&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;
&lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates&quot; data-wiki-id=&quot;en:dev:templates&quot;&gt;Back to the section&amp;#039;s table of contents&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Customizing an Output Layout&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;customizing-an-output-layout&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:9,&amp;quot;secid&amp;quot;:11,&amp;quot;range&amp;quot;:&amp;quot;10272-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="https://docs.instantcms.ru/en/dev/templates/options?rev=1489871888">
        <dc:format>text/html</dc:format>
        <dc:date>2017-03-18T21:18:08+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Creating Template Options</title>
        <link>https://docs.instantcms.ru/en/dev/templates/options?rev=1489871888</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;creating-template-options&quot;&gt;Creating Template Options&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
If necessary, each template can have a set of options. 
Suppose, our template is called &lt;strong&gt;«my_best_template»&lt;/strong&gt;. Do the following to create a form of options:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Create the &lt;code&gt;/templates/my_best_template/options.form.php&lt;/code&gt; php file;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Inside it, define a class for the options form whose title is formed according to the &lt;code&gt;formTemplateTitleTemplateOptions&lt;/code&gt; principle, in our case, it will be called formMyBestTemplateTemplateOptions;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Describe the &lt;a href=&quot;https://docs.instantcms.ru/en/dev/forms/create_form/add_fields&quot; class=&quot;wikilink2&quot; title=&quot;en:dev:forms:create_form:add_fields&quot; rel=&quot;nofollow&quot; data-wiki-id=&quot;en:dev:forms:create_form:add_fields&quot;&gt;form fields&lt;/a&gt;.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Once the form is created, a link to the settings page will automatically appear on the “Interface” tab in the site&amp;#039;s General Settings.
&lt;/p&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 &lt;img src=&quot;https://docs.instantcms.ru/lib/images/smileys/exclaim.svg&quot; class=&quot;icon smiley&quot; alt=&quot;:!:&quot; /&gt; Pay attention! The form class should be always defined as &lt;code&gt;formTemplateOptions&lt;/code&gt; for InstantCMS version 2.4.0 and older. I.e. the title is identical for all templates. &lt;/div&gt;&lt;/blockquote&gt;

&lt;p&gt;
In a custom template, you can (optionally) describe your own form output template. As for our &lt;strong&gt;«my_best_template»&lt;/strong&gt; template title, create a file under the path &lt;code&gt;/templates/my_best_template/controllers/admin/settings_theme.tpl.php&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;
Its minimum contents can be as follows:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&amp;lt;h1&amp;gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; LANG_CP_SETTINGS_TEMPLATE_OPTIONS&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;: &amp;lt;span&amp;gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$template_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/span&amp;gt;&amp;lt;/h1&amp;gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setPageTitle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;LANG_CP_SETTINGS_TEMPLATE_OPTIONS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addBreadcrumb&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;LANG_CP_SECTION_SETTINGS&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;href_to&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'settings'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addBreadcrumb&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;LANG_CP_SETTINGS_TEMPLATE_OPTIONS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;renderForm&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$form&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$options&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;
        &lt;span class=&quot;st_h&quot;&gt;'action'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;st_h&quot;&gt;'method'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'post'&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$errors&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
All template settings are saved in the YAML-format file located under the path &lt;code&gt;/system/config/theme_TEMPLATE-TITLE.yml&lt;/code&gt;, i.e. it is the &lt;code&gt;/system/config/theme_my_best_template.yml&lt;/code&gt; file in our case.
&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;
&lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates&quot; data-wiki-id=&quot;en:dev:templates&quot;&gt;Back to Section Contents&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
</description>
    </item>
    <item rdf:about="https://docs.instantcms.ru/en/dev/templates/overview?rev=1489866599">
        <dc:format>text/html</dc:format>
        <dc:date>2017-03-18T19:49:59+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Introduction to InstantCMS templates</title>
        <link>https://docs.instantcms.ru/en/dev/templates/overview?rev=1489866599</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;introduction-to-instantcms-templates&quot;&gt;Introduction to InstantCMS templates&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
InstantCMS templates are located in subcategories of the &lt;code&gt;/templates/&lt;/code&gt; directory. The template directory may contain &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; tables, JavaScript files, files of output templates, &lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates/helpers&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates:helpers&quot; data-wiki-id=&quot;en:dev:templates:helpers&quot;&gt;helper function file&lt;/a&gt;, &lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates/options&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates:options&quot; data-wiki-id=&quot;en:dev:templates:options&quot;&gt;template options form&lt;/a&gt; and various images.
For instance, the template called «test» is located in the &lt;code&gt;/templates/test/&lt;/code&gt; directory. 
&lt;/p&gt;

&lt;p&gt;
There is the «default» template in InstantCMS by default. For a better understanding of how to create a custom template, carefully examine the files it contains.
&lt;/p&gt;

&lt;p&gt;
InstantCMS does not use any template engine like Smarty or Twig. All code is written in PHP. The main purpose of InstantCMS templates is to &lt;a href=&quot;https://docs.instantcms.ru/en/dev/overview&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:overview&quot; data-wiki-id=&quot;en:dev:overview&quot;&gt;separate&lt;/a&gt; presentation from logic.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Introduction to InstantCMS templates&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;introduction-to-instantcms-templates&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-804&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;what-kind-of-template-files-can-be&quot;&gt;What kind of template files can be?&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Under template files we assume certain files with the &lt;code&gt;.tpl.php&lt;/code&gt; double extension. In other words, the files are ordinary PHP files, while the second .tpl extension indicates the template file. In the full title of the file, anything that comes before &lt;code&gt;.tpl.php&lt;/code&gt; is the template title. For example, a file is called &lt;code&gt;index.tpl.php&lt;/code&gt; - the engine will operate with the &lt;code&gt;index&lt;/code&gt; name only.
&lt;/p&gt;

&lt;p&gt;
An InstantCMS template consists of a common &lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates/layouts&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates:layouts&quot; data-wiki-id=&quot;en:dev:templates:layouts&quot;&gt;layout&lt;/a&gt; (there can be more than one) and output files-templates.
&lt;/p&gt;

&lt;p&gt;
A common layout is the main template of all site pages and contains the &amp;lt;html&amp;gt;, &amp;lt;head&amp;gt; and &amp;lt;body&amp;gt; tags. The templates of components and widgets are output inside it. By default, the engine uses two layouts: main.tpl.php for the site and admin.tpl.php for the Control panel.
&lt;/p&gt;

&lt;p&gt;
Output template files are intended to display the work results of &lt;a href=&quot;https://docs.instantcms.ru/en/dev/controllers/templates&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:controllers:templates&quot; data-wiki-id=&quot;en:dev:controllers:templates&quot;&gt;controllers&lt;/a&gt;, &lt;a href=&quot;https://docs.instantcms.ru/en/dev/widgets&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:widgets&quot; data-wiki-id=&quot;en:dev:widgets&quot;&gt;widgets&lt;/a&gt; or other subsidiary actions, for example, error messages, output of &lt;a href=&quot;https://docs.instantcms.ru/en/dev/forms&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:forms&quot; data-wiki-id=&quot;en:dev:forms&quot;&gt;form&lt;/a&gt; fields.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;What kind of template files can be?&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;what-kind-of-template-files-can-be&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;805-1903&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;a-list-of-standard-template-files-and-directories&quot;&gt;A list of standard template files and directories&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
The path to the files from the tables below is specified relative to the template’s root directory, i.e., if a template is located in the &lt;code&gt;/templates/test/&lt;/code&gt; directory, the paths below are specified relative to &lt;code&gt;/templates/test/&lt;/code&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;A list of standard template files and directories&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;a-list-of-standard-template-files-and-directories&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;1904-2203&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit4&quot; id=&quot;required-template-files&quot;&gt;Required template files&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;div class=&quot;table sectionedit5&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;thead&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;th class=&quot;col0&quot;&gt; File path &lt;/th&gt;&lt;th class=&quot;col1&quot;&gt; Assignment &lt;/th&gt;
	&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;main.tpl.php&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; Main template layout &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row2&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;admin.tpl.php&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; Control panel layout * &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row3&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;scheme.html&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; &lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates/scheme&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates:scheme&quot; data-wiki-id=&quot;en:dev:templates:scheme&quot;&gt;Template position layout&lt;/a&gt; &lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;2241-2434&amp;quot;} --&gt;
&lt;p&gt;
* The file is required if other than the default template is chosen for the Control panel. On the contrary, the template may not contain this file.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Required template files&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;required-template-files&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;2204-2583&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit6&quot; id=&quot;other-files-and-directories&quot;&gt;Other files and directories&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;div class=&quot;table sectionedit7&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;thead&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;th class=&quot;col0&quot;&gt; Path to a file or directory &lt;/th&gt;&lt;th class=&quot;col1&quot;&gt; Assignment &lt;/th&gt;
	&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;options.form.php&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; &lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates/options&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates:options&quot; data-wiki-id=&quot;en:dev:templates:options&quot;&gt;template options form&amp;#039;s file&lt;/a&gt; &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row2&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;assets/errors/&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; error templates, 404 page template and messages notifying that the site is closed &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row3&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;assets/fields/&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; templates of &lt;a href=&quot;https://docs.instantcms.ru/en/dev/forms&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:forms&quot; data-wiki-id=&quot;en:dev:forms&quot;&gt;form&lt;/a&gt; fields &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row4&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;assets/ui/&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; templates of “breadcrumbs”, content filter panels, forms, menus and Control panel entry lists &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row5&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;content/&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; templates of entry lists and content type entry pages &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row6&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;controllers/CONTROLLER/&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; controller frontend templates &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row7&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;controllers/CONTROLLER/styles.css&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; controller &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; file &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row8&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;controllers/CONTROLLER/backend/&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; controller backend templates &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row9&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;controllers/CONTROLLER/backend/styles.css&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; controller backend&amp;#039;s &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; file &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row10&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;controllers/CONTROLLER/widgets/WIDGET/&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; controller widget templates &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row11&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;css/&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; template &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; files linked in the layout &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row12&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;images/&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; images used in a template &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row13&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;js/&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; JavaScript scripts used in a template &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row14&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;js/fields/FIELD_TITLE.js&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; JavaScript script automatically linked to a template field &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row15&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;profiles/options.form.php&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; an option form to customize user profiles &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row16&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;profiles/styler.php&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1 leftalign&quot;&gt; a set of dynamically created &lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt; styles to customize user profiles  &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row17&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;widgets/&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; a directory of widget templates not linked to controllers &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row18&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;strong&gt;widgets/wrapper*.tpl.php&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; files-wrappers in which the widget work results are displayed &lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table1&amp;quot;,&amp;quot;secid&amp;quot;:7,&amp;quot;range&amp;quot;:&amp;quot;2623-4073&amp;quot;} --&gt;
&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Other files and directories&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;other-files-and-directories&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:6,&amp;quot;range&amp;quot;:&amp;quot;2584-4075&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit8&quot; id=&quot;how-the-engine-works-with-template-files&quot;&gt;How the engine works with template files&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
There is an inheritance mechanism of template files in InstantCMS. This means that when linking a relevant template file, css and javascript files, the engine searches it in the current template first and then in other templates, if the inheritance chain is specified. The default template is always the root of the chain. Read more about the inheritance mechanism &lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates/inherits&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates:inherits&quot; data-wiki-id=&quot;en:dev:templates:inherits&quot;&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;
&lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates&quot; data-wiki-id=&quot;en:dev:templates&quot;&gt;Back to Section Contents&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;How the engine works with template files&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;how-the-engine-works-with-template-files&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:8,&amp;quot;range&amp;quot;:&amp;quot;4076-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="https://docs.instantcms.ru/en/dev/templates/page-params?rev=1490171061">
        <dc:format>text/html</dc:format>
        <dc:date>2017-03-22T08:24:21+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>SEO Tags and Other Head Entries</title>
        <link>https://docs.instantcms.ru/en/dev/templates/page-params?rev=1490171061</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;seo-tags-and-other-head-entries&quot;&gt;SEO Tags and Other Head Entries&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
The tags in the &amp;lt;head&amp;gt; container of the page are managed in the templates. The methods that are listed below are available via the &lt;code&gt;$this&lt;/code&gt; context, because all template files are linked inside the linking methods of the cmsTemplate class object. Herewith, you can certainly request the specified methods in the context of actions and methods of a controller via &lt;code&gt;$this→cms_template&lt;/code&gt; too and get the template’s object via the &lt;code&gt;$template = cmsTemplate::getInstance();&lt;/code&gt; singleton in general cases.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setPageTitle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$pagetitle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Sets the page title (&amp;lt;title&amp;gt; tag). If several arguments have been passed, it joins them into one string with delimiter &lt;code&gt; · &lt;/code&gt; in between. If an array of titles has been passed, it joins the values into one string too, but with the «whitespace» delimiter in between. If the «Append site name to the page title tag» option is enabled in the site settings, the site name will be appended to the specified title.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setMeta&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$keywords&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$description&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Sets the keywords and description meta tags for the page. The &lt;code&gt;$keywords&lt;/code&gt; and &lt;code&gt;$description&lt;/code&gt; variables should contain a string ready for output.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setPageKeywords&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$keywords&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Sets the value of the keywords meta tag.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setPageDescription&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$description&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Sets the value of the description meta tag
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;addHead&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$tag&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$is_include_once&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Adds a random &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; tag to the head section of the page.
$tag variable - tag’s &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; code. 
If the $is_include_once variable is set to true, the tag will not be linked twice (default behaviour).
&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;
&lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates&quot; data-wiki-id=&quot;en:dev:templates&quot;&gt;Back to Section Contents&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
</description>
    </item>
    <item rdf:about="https://docs.instantcms.ru/en/dev/templates/scheme?rev=1489960251">
        <dc:format>text/html</dc:format>
        <dc:date>2017-03-19T21:50:51+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Creating a Position Layout File</title>
        <link>https://docs.instantcms.ru/en/dev/templates/scheme?rev=1489960251</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;creating-a-position-layout-file&quot;&gt;Creating a Position Layout File&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
A position layout file is meant for placing &lt;a href=&quot;https://docs.instantcms.ru/en/manual/widgets&quot; class=&quot;wikilink1&quot; title=&quot;en:manual:widgets&quot; data-wiki-id=&quot;en:manual:widgets&quot;&gt;widgets&lt;/a&gt; in the Control panel in a visual, user-friendly way. You should visualize all your template positions in it.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Creating a Position Layout File&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;creating-a-position-layout-file&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-232&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
This file is called scheme.html and is located in the root of the category tree of your template. Inside the file, &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; code is defined by means of &lt;abbr title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/abbr&gt; tables; however, you can design any layout at your discretion.
&lt;/p&gt;

&lt;p&gt;
You can use a PHP code in this file, via $this all methods of the cmsTemplate class object are available.  In particular, if your template has options, on which, for example, a sidebar location depends, you can design a position layout with regard to these options’ values.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Introduction&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;introduction&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;233-753&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;key-expressions&quot;&gt;Key Expressions&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
In this file, logic files are marked by key expressions. The expressions are wrapped in curly brackets and are separated by the colon ( : ) sign inside. The expression type is to the left of the colon, its value is to the right. Expression values may contain English alphabet letters, numbers, underscore signs and a hyphen. There are three types of expressions:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; {position:POSITION_TITLE}&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; {block:LABEL}&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; {cell:LABEL}&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Blocks, where widgets are dragged and dropped, are marked by the {position:POSITION_TITLE} expression.
Think up the titles of positions beforehand, they should be identical both in this file and in the layout file of the template.
&lt;/p&gt;

&lt;p&gt;
The {block:LABEL} and {cell:LABEL} blocks are, in fact, identical, though differ by their possible position in the layout. You can place {block:LABEL} next to the output of position blocks, whereas {cell:LABEL} is isolated from position blocks (they should not be at the top or bottom). The label is either a constant title, or some English text. These blocks are optional; they are designed to make the position layout of a template more visually user-friendly.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Key Expressions&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;key-expressions&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;754-1909&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;example&quot;&gt;Example&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code html4strict&quot;&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/table.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;table&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;30%&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;filled&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            {cell:LANG_PAGE_LOGO}
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
            {position:header}
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/table.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;table&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/table.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;table&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;colspan&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            {position:top}
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;?php if&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;$this-&amp;gt;&lt;/span&gt;options['aside_pos'] == 'left'){ ?&amp;gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;35%&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
                {position:right-top}
                {position:right-center}
                {position:right-bottom}
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;?php &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; ?&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;65%&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            {position:left-top}
            {block:LANG_PAGE_BODY}
            {position:left-bottom}
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;?php if&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;$this-&amp;gt;&lt;/span&gt;options['aside_pos'] == 'right'){ ?&amp;gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;35%&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
                {position:right-top}
                {position:right-center}
                {position:right-bottom}
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;?php &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; ?&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/table.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;table&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/table.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;table&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;65%&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;filled&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            {cell:LANG_PAGE_FOOTER}
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
            {position:footer}
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/td.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;td&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/tr.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;tr&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/table.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;table&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;hr /&gt;

&lt;p&gt;
&lt;a href=&quot;https://docs.instantcms.ru/en/dev/templates&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:templates&quot; data-wiki-id=&quot;en:dev:templates&quot;&gt;Back to Section Contents&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Example&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;example&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;1910-&amp;quot;} --&gt;</description>
    </item>
</rdf:RDF>
