Welcome Guest, Not a member yet? Register   Sign In
Self-referencing links...
#1

[eluser]Matteo[/eluser]
A lot of websites, including my CI site, have logos in the header that link the user back to the landing or home page.

In CI, if I include the following:

Code:
<a id="logo" href="/index.php/controller/method"><img src="/imgs/logo.png" alt="LogoName" /></a>
or
Code:
<a id="logo" href="/controller/method"><img src="/imgs/logo.png" alt="LogoName" /></a>
or similar, I get CI's 404 error.

Anyone know of a way to self-reference the home page within the CI framework without having to type in the full address, like:

Code:
<a id="logo" href="http://domain.com/index.php/controller/method"><img src="/imgs/logo.png" alt="LogoName" /></a>

In other works, I might not understand the full ramifications of CI's URI system.

Any ideas? I really want want to use an abbreviated address in the code.
#2

[eluser]Clooner[/eluser]
The url helper has a function called base_url();
#3

[eluser]InsiteFX[/eluser]
If you look in the Ignited Code Fourms I just placed a anchor with image helper!




Theme © iAndrew 2016 - Forum software by © MyBB