I'm trying to make part of the menu on my site not be cached with the rest of it. The smarty site says to use the insert tag rather than include.
I'm probably misreading the insert page but i can't get it to work
I have my nav.tpl file, which contains the content i want cached, and a nav-php.tpl file which has the content i don't want cached
My nav.tpl file is called by index.tpl. nav-php.tpl is called by nav.tpl
This is the error i'm getting
Warning: Smarty error: file:nav-php.tpl is not readable in /home/.lagoons/midnighttempest/smarty/smartylib/Smarty.class.php on line 1092
I don't know why the file isn't readable. The file exists in the smarty template directory
/smarty/templates/
This is my nav.tpl
<div class="mt" id="Complete">
<div class="mt" id="Title"></div>
<div class="mt" id="info">
<p><img src="/images/layout/info.png" alt="Info" width="150" height="26" /></p>
<p><a href="/index.php">Home</a><br />
<a href="/about-rules.php">About / Rules</a><br />
<a href="/join.php">Join Form </a></p>
<p> </p>
<p><img src="/images/layout/mem.png" alt="Members" width="150" height="26" /><br />
<a href="/memberlist.php">Memberlist</a><br />
<a href="/cards.php">Card List</a><br />
<a href="/games.php">Games</a><br />
<a href="http://forums.midnighttempest.com" target="_blank">Forum</a><br />
<a href="/donate.php">Donate</a> <br />
{insert name="menu" script="nav-php.tpl"}
</p>
<p> </p>
<p><img src="/images/layout/other.png" alt="Other" width="150" height="26" /><br />
<a href="/affiliate.php">Affiliates</a><br />
<a href="/link.php">Link to us</a><br />
<a href="/randomizer.php">Randomizer</a> / <a href="/staffpay.php">Staff Pay</a><br />
<a href="/credits.php">Credits</a></p>
</div>
<div class="mt" id="content">
and this is my nav-php.tpl
{php}
function insert_menu() {
if (isset($_COOKIE['mttcg'])) {
echo '<a href="/users/index.php">Members Area</a><br />
<a href="/users/user.php?user='.$_COOKIE['mttcg']['u'].'" target="_blank" >View Cards</a><br />
<a href="/log_out.php">Log Out</a>';
} else {
echo '<a href="/games.php">Login</a>';
}
}
{/php}