eXtension Templates for PHP (XTP for short)

Actual implementation of component - HTML

To better learn how to implement component (.phpx file) in XTP we should look this simple example:

<@
    <option name="class" value="Navigation"/>
    <option name="source" value="navigation.php"/>
    <control tag="links" prefix="y" path="links.phpx"/>
@>
<div id="sidebar"><h2>Navigation</h2>
    <ul>
        <li><a href="/Codenizer">Codenizer</a></li>
        <li><a href="/Memory">Memory Leak Detector</a></li>
        <li><a href="/Support">Support Center</a></li>
            ${$this->Menu}
        <li><a href="/Contact">Contact</a></li>
        <li><a href="/About">About Softwarehood</a></li>
    </ul>
    <y:links/>
</div>

We can see that after prologue part (between <@ and @>) goes normal HTML with two exceptions:

« Previous
Connecting code and template
Next »
Logic controlling component - PHP