Welcome Guest, Not a member yet? Register   Sign In
Using PHP code in the Template library configuration file?
#1

[eluser]parham90[/eluser]
Hello,

I have downloaded a library called Template library for CodeIgniter. While it is very good, I want to define a default menu bar for my whole application in the configuration. There's a problem with this, however. The items in the configuration file, apparently, do not get parsed. So if I put PHP code in the configuration file, it will just stay as is, and appear in the final HTML page. I am assuming what I need to do is to find something that runs every time a page is requested, and set the menu there. For example:
Code:
$data['menu') = "<ul>
<li>&lt;?=anchor('users/register', 'register')?&gt;</li>
</ul>
";

Is there a more clean workaround? If not, where do you recommend I put this code?

Thanks!


Messages In This Thread
Using PHP code in the Template library configuration file? - by El Forum - 07-29-2010, 04:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB