Welcome Guest, Not a member yet? Register   Sign In
Best practices for menus, pages question. am i using too many site_url() functions...?
#1

[eluser]Unknown[/eluser]
i'm not clear on what best practices would be re: creating menus and pages via code igniter.

currently what i have is this…

one controller with several diff functions. each function is a corresponding page and loads a corresponding view. my concern is that in the menu i'm having to use things like…

<a href="&lt;?php echo site_url(); ?&gt;/home/products">Products</a>

and am using header and footer includes which, if displaying an image do this:

<img src="&lt;?php echo base_url(); ?&gt;img/logo-small.gif" alt="Floyd Eats Little Logo">

my concern is,.. is that too many function calls?, site_url() and base_url() ??

if there is a better way or better practice i'd like to know what it is. is there anyway to use simple relative paths?

sorry for the newb question!, thanks




Theme © iAndrew 2016 - Forum software by © MyBB