tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/32-how-do-i-insert-php-code-at-the-top-of-a-templateCascade CMS: Discussion 2018-10-18T20:35:56Ztag:help-archives.hannonhill.com,2010-02-09:Comment/17750892010-05-25T19:45:28Z2010-05-25T20:07:16ZHow do I insert php code at the top of a template.<div><p>Try using a <a href=
"http://www.hannonhill.com/kb/Code-Sections/index.html">START-ROOT-CODE
section</a>.</p>
<p>The template parser doesn't like unrecognized tags that look
like XML processing instructions:<br></p>
<pre>
<code><?php ... ?></code>
</pre>
<p>Your template would look something like this:<br></p>
<pre>
<code><?xml version="1.0"?>
<html>
<!--#START-ROOT-CODE
<?php ... my php ...?>
#END-ROOT-CODE-->
.... rest of template ...
</html></code>
</pre>
<p>and would move the php to the top when rendering the page for
publishing.</p></div>Bradley Wagnertag:help-archives.hannonhill.com,2010-02-09:Comment/17750892010-05-25T20:09:28Z2010-05-25T20:09:32ZHow do I insert php code at the top of a template.<div><p>that's what I was looking for :) thx!</p></div>John Turner