Welcome Guest, Not a member yet? Register   Sign In
Dynamic content in the template file
#15

[eluser]InsiteFX[/eluser]
$i is not being incremented so it will always contain the same value of $nav_item!
Code:
<?php foreach($nav_list  as $i => $nav_item): ?>
                <li &lt;?  if ($nav==$i){ ?&gt;  id="current" &lt;? } ?&gt; >&lt;?= anchor($nav_item, '<span>'.$i.'</span>') ?&gt;</li>
// you may need to re-code this for error checking!
$i++;
&lt;?php endforeach ?&gt;

InsiteFX


Messages In This Thread
Dynamic content in the template file - by El Forum - 03-29-2011, 02:48 PM
Dynamic content in the template file - by El Forum - 03-30-2011, 04:17 AM
Dynamic content in the template file - by El Forum - 03-30-2011, 08:52 AM
Dynamic content in the template file - by El Forum - 03-30-2011, 09:15 AM
Dynamic content in the template file - by El Forum - 03-30-2011, 09:54 AM
Dynamic content in the template file - by El Forum - 03-30-2011, 11:38 AM
Dynamic content in the template file - by El Forum - 03-30-2011, 11:49 AM
Dynamic content in the template file - by El Forum - 03-30-2011, 11:59 AM
Dynamic content in the template file - by El Forum - 03-30-2011, 12:01 PM
Dynamic content in the template file - by El Forum - 03-30-2011, 12:04 PM
Dynamic content in the template file - by El Forum - 03-30-2011, 12:09 PM
Dynamic content in the template file - by El Forum - 03-30-2011, 12:18 PM
Dynamic content in the template file - by El Forum - 03-30-2011, 12:23 PM
Dynamic content in the template file - by El Forum - 03-31-2011, 04:31 PM
Dynamic content in the template file - by El Forum - 03-31-2011, 07:24 PM
Dynamic content in the template file - by El Forum - 03-31-2011, 07:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB