PHP Classes

File: templates.json

Recommend this page to a friend!
  Classes of Aleksey Nemiro   PHP ASP.NET WebForms   templates.json   Download  
File: templates.json
Role: Documentation
Content type: text/plain
Description: Documentation
Class: PHP ASP.NET WebForms
Emulation of ASP.NET WebForms engine in PHP
Author: By
Last change:
Date: 9 years ago
Size: 4,526 bytes
 

Contents

Class file image Download
[ { "Key": "PageTitle", "Value": "Templates" }, { "Key": "HeaderTitle", "Value": "Templates" }, { "Key": "HeaderDescription", "Value": "No more need to carry html-layout for each page. By using templates, the content of the pages are automatically placed in the desired area. The number of content blocks is not limited." }, { "Key": "TemplateLocalization", "Value": "Localization" }, { "Key": "ServerCode", "Value": "Server code" }, { "Key": "ContentBlocksLabelNames", "Value": "Marker names for blocks of content" }, { "Key": "SimpleExampleText1", "Value": "The following example shows the template in which defined two markers to output content: <code>&lt;php:Head/&gt;</code> and <code>&lt;php:MainContent/&gt;</code>." }, { "Key": "SimpleExampleText2", "Value": "Pages can contain blocks of content for the markers. To place content blocks, uses a special tag: <code>php:Content</code>." }, { "Key": "MarkerName", "Value": "markerName" }, { "Key": "ContentBlockExample", "Value": "\n Contents of the block here.\n Acceptable use any tag, \n server code and \n user controls.\n" }, { "Key": "SimpleExampleText3", "Value": "If for the marker has not be content, then the marker is removed from the final code." }, { "Key": "SimpleExampleText4", "Value": "The following example shows HTML-code page with content for <code>MainContent</code>: <code>&lt;h2&gt;Hello world!&lt;/h2&gt;</code>." }, { "Key": "SimpleExampleText5", "Value": "The result of a web request specified below." }, { "Key": "IntroductionText1", "Value": "Templates - is <strong>HTML</strong> files with special tags, which will be replaced to the content." }, { "Key": "IntroductionText2", "Value": "Content markers must be written in the format: <code>&lt;php:markerName/&gt;</code>." }, { "Key": "IntroductionText3", "Value": "The template can be an unlimited number of content markers, but usually only two or three." }, { "Key": "DirectivesText1", "Value": "The templates can be used directive <code>&lt;?#Register ?&gt;</code> to register a <a href=\"/controls.php${Lang}\">user controls</a>." }, { "Key": "DirectivesText2", "Value": "Other directives are not supported and will not be processed." }, { "Key": "DirectivesText3", "Value": "The following example shows how to use directives in the template. The <code>&lt;?#Page ?&gt;</code> directive will be ignored and will result in the original form. The <code>&lt;?#Register ?&gt;</code> directives will be successfully processed and removed from the output data." }, { "Key": "ThisIsSimpleExample", "Value": "This is a simple example" }, { "Key": "PageDirectiveIsNotSuppored", "Value": "The #Page directive is not supported in the templates" }, { "Key": "TemplateLocalizationText1", "Value": "To localize the templates can be used global resources (<strong>global.json</strong>)." }, { "Key": "TemplateLocalizationText2", "Value": "When localization should take into account that individual keys can be overwritten in the local resources of pages." }, { "Key": "ServerCodeText1", "Value": "Unfortunately, in the current version of the engine, in a templates does not work processing server-side code. It is easy to fix, but it does not make sense, because you can use <a href=\"/controls.php${Lang}\">user controls</a>, in which there are no such restrictions." }, { "Key": "ServerCodeText2", "Value": "If you want to implement support for server-side code in the templates, you can do it in the <code>\\Nemiro\\UI\\Page</code>. For example, in the method <code>Render</code>." }, { "Key": "ProcessingServerCodeHere", "Value": "processing blocks of a server code here" }, { "Key": "ServerCodeText3", "Value": "Please note that the processing of server-side code will require additional resources and high load it can slow down processing of requests." }, { "Key": "ContentBlocksLabelNamesText1", "Value": "Marker names (identifiers) should consist of English letters and numbers." }, { "Key": "ContentBlocksLabelNamesText2", "Value": "To avoid conflicts, the marker names must not overlap with existing names of user controls that have the prefix <code>php:</code>." }, { "Key": "ContentBlocksLabelNamesText3", "Value": "Marker names are not checked for uniqueness. If a template has a multiple markers with the same names, the contents for the markers will be set for all copies." }, { "Key": "ContentBlocksLabelNamesText4", "Value": "The following example shows a template with two tags <code>&lt;php:MainContent/&gt;</code> and the result of the query." } ]