<?#Register Src="~/Controls/Message.php" TagPrefix="php" TagName="Message"?>
<?#Register Src="~/Controls/TabControl.php" TagPrefix="php" TagName="TabControl"?>
<html xmlns:php="http://aleksey.nemiro.ru/php-webforms">
<body>
<php:Content ID="MainContent">
<h2 id="introduction">${Introduction}</h2>
<p>${IntroductionText1}</p>
<p>${IntroductionText2}</p>
<p>${IntroductionText3}</p>
<h3 id="contents">${Contents}</h3>
<ul>
<li><a href="#example">${SimpleExample}</a></li>
<li><a href="#directives">${Directives}</a></li>
<li><a href="#localization">${TemplateLocalization}</a></li>
<li><a href="#php">${ServerCode}</a></li>
<li><a href="#markers">${ContentBlocksLabelNames}</a></li>
</ul>
<h2 id="example">${SimpleExample}</h2>
<p>${SimpleExampleText1}</p>
<pre><code class="html"><!DOCTYPE html>
<html xmlns:php="http://aleksey.nemiro.ru/php-webforms">
<head>
<title></title>
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="/Content/css/bootstrap.min.css" />
<script src="/Scripts/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="/Scripts/bootstrap.min.js" type="text/javascript"></script>
<php:Head/>
</head>
<body>
<div class="container">
<php:MainContent/>
</div>
</body>
</html></code></pre>
<p>${SimpleExampleText2}</p>
<pre><code class="html"><php:Content ID="${MarkerName}">${ContentBlockExample}</php:Content></code></pre>
<p>${SimpleExampleText3}</p>
<p>${SimpleExampleText4}</p>
<pre><code class="html"><php:Content ID="MainContent">
<h2>${HelloWorld}</h2>
</php:Content></code></pre>
<p>${SimpleExampleText5}</p>
<pre><code class="html"><!DOCTYPE html>
<html xmlns:php="http://aleksey.nemiro.ru/php-webforms">
<head>
<title>${DefaultTitle}</title>
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="/Content/css/bootstrap.min.css" />
<script src="/Scripts/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="/Scripts/bootstrap.min.js" type="text/javascript"></script>
</head>
<body>
<div class="container">
<h2>${HelloWorld}</h2>
</div>
</body>
</html></code></pre>
<h2 id="directives">${Directives}</h2>
<p>${DirectivesText1}</p>
<p>${DirectivesText2}</p>
<p>${DirectivesText3}</p>
<php:TabControl>
<php:Items>
<php:TabItem Key="Template" Title="${Template}">
<pre><code class="html"><?#Page Title="Test"?>
<?#Register Src="~/Controls/Header.php" TagPrefix="php" TagName="Header"?>
<?#Register Src="~/Controls/Footer.php" TagPrefix="php" TagName="Footer"?>
<?#Register Src="~/Controls/Message.php" TagPrefix="php" TagName="Message"?>
<!DOCTYPE html>
<html xmlns:php="http://aleksey.nemiro.ru/php-webforms">
<head>
<title></title>
</head>
<body>
<php:Header ID="Header1" />
<div class="container">
<php:Message Type="Info" Content="${ThisIsSimpleExample}" />
<hr />
<php:MainContent/>
</div>
<php:Footer ID="Footer1" />
</body>
</html></code></pre>
</php:TabItem>
<php:TabItem Key="Content" Title="${ContentPage}">
<pre><code class="html"><php:Content ID="MainContent">
${HelloWorld}
</php:Content></code></pre>
</php:TabItem>
<php:TabItem Key="Result" Title="${Result}">
<pre><code class="html"><!--${PageDirectiveIsNotSuppored}-->
<?#Page Title="Test"?>
<!DOCTYPE html>
<html xmlns:php="http://aleksey.nemiro.ru/php-webforms">
<head>
<title>${DefaultTitle}</title>
</head>
<body>
<!--${StartOutputElement} Header-->
<h1>Test site</h1>
<!--${EndOutputElement} Header-->
<div class="container">
<!--${StartOutputElement} Message-->
<div class="alert alert-info">${ThisIsSimpleExample}</div>
<!--${EndOutputElement} Message-->
<hr />
<!--${StartOutputContentBlock} MainContent-->
${HelloWorld}
<!--${EndOutputContentBlock} MainContent-->
</div>
<!--${StartOutputElement} Footer-->
<footer>
Copyright © Example, 2015. All rights reserved.
</footer>
<!--${EndOutputElement}? Footer-->
</body>
</html></code></pre>
</php:TabItem>
</php:Items>
</php:TabControl>
<h2 id="localization">${TemplateLocalization}</h2>
<p>${TemplateLocalizationText1}</p>
<p>${TemplateLocalizationText2}</p>
<p><a href="/localization.php${Lang}">${ReadMoreAboutLocalization}</a>.</p>
<h2 id="php">${ServerCode}</h2>
<p>${ServerCodeText1}</p>
<p>${ServerCodeText2}</p>
<pre><code class="php"># ...
# add head
$pattern = '|<head>(.*)</head>|is';
$result = preg_replace($pattern, '<head>$1'.$h.'</head>', $result);
# ${ProcessingServerCodeHere}
$result = $this->Execute($result);
# controls
$result = $this->RanderControl('Template', $result);
# content blocks
if ($this->Content != NULL && count($this->Content) > 0)
# ...</code></pre>
<p>${ServerCodeText3}</p>
<h2 id="markers">${ContentBlocksLabelNames}</h2>
<p>${ContentBlocksLabelNamesText1}</p>
<php:Message Type="Warning">${ContentBlocksLabelNamesText2}</php:Message>
<p>${ContentBlocksLabelNamesText3}</p>
<p>${ContentBlocksLabelNamesText4}</p>
<php:TabControl>
<php:Items>
<php:TabItem Key="Template" Title="${Template}">
<pre><code class="html"><!DOCTYPE html>
<html xmlns:php="http://aleksey.nemiro.ru/php-webforms">
<head>
<title></title>
</head>
<body>
<div class="container">
<php:MainContent/>
<br />
<php:MainContent/>
</div>
</body>
</html></code></pre>
</php:TabItem>
<php:TabItem Key="Content" Title="${ContentPage}">
<pre><code class="html"><php:Content ID="MainContent">
${Hello}
</php:Content></code></pre>
</php:TabItem>
<php:TabItem Key="Result" Title="${Result}">
<pre><code class="html"><!DOCTYPE html>
<html xmlns:php="http://aleksey.nemiro.ru/php-webforms">
<head>
<title>${DefaultTitle}</title>
</head>
<body>
<div class="container">
${Hello}
<br />
${Hello}
</div>
</body>
</html></code></pre>
</php:TabItem>
</php:Items>
</php:TabControl>
</php:Content>
</body>
</html>
|