![]() |
html linking not working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1) +--- Forum: Lounge (https://forum.codeigniter.com/forumdisplay.php?fid=3) +--- Thread: html linking not working (/showthread.php?tid=71135) |
html linking not working - kvanaraj - 07-10-2018 HTML Page ********** <body id="myPage" data-spy="scroll" data-target=".navbar" data-offset="60"> <div class="main-header" id="main-header"> <nav class="navbar mynav navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">Baskaran</a> </div> <div class="collapse navbar-collapse" id="myNavbar"> <ul class="nav navbar-nav navbar-right"> <li class="active"><a href="#banner">Home</a></li> <li><a href="#work">About</a></li> <li><a href="#edu">Education</a></li> <li><a href="#exp">Experience</a></li> <li><a href="#res">Research</a></li> <li><a href="#award">Award</a></li> <li><a href="#testimonials">Testimonial</a></li> <li><a href="#portfolio">Portfolio</a></li> <li><a href="#contact">Contact Us</a></li> </ul> </div> </div> </nav> all container are single file. I want it to be separate. like this ****** <li><a href="#work">About</a></li> <li><a href="pages/edu.html">Education</a></li> <li><a href="pages/exp.html">Experience</a></li> <li><a href="pages/res.html">Research</a></li> <li><a href="pages/awa.html">Award</a></li> <li><a href="pages/tes.html">Testimonial</a></li> <li><a href="pages/por.html">Portfolio</a></li> <li><a href="pages/con.html">Contact Us</a></li> when i call index file this URL not working. this is the html page ,based on this i will call my php projects. If i am view in the source code , link is working. what mistake i have done. RE: html linking not working - Pertti - 07-10-2018 Are you using CodeIgniter? From first guess, pages/por.html won't work in CodeIgniter because of the .html in the end, but if you have Controller Pages.php with method por, then site_url('pages/por') should give you correct working link. RE: html linking not working - kvanaraj - 07-10-2018 (07-10-2018, 11:13 PM)Pertti Wrote: Are you using CodeIgniter? it's a HTML Page . Main page of the my project. thats why RE: html linking not working - kaitenz - 07-11-2018 (07-10-2018, 11:24 PM)kvanaraj Wrote:(07-10-2018, 11:13 PM)Pertti Wrote: Are you using CodeIgniter? Why HTML? Use PHP. site_url() won't work on HTML files. And why you're using HTML files? Save all your view files inside './application/views/'. If I get your point. RE: html linking not working - kvanaraj - 07-11-2018 (07-11-2018, 05:39 AM)kaitenz Wrote:No. Kaitanz . i know in php codeigniter. But it's a html page .it's a main page of my project(07-10-2018, 11:24 PM)kvanaraj Wrote:(07-10-2018, 11:13 PM)Pertti Wrote: Are you using CodeIgniter? RE: html linking not working - InsiteFX - 07-11-2018 Where are these html pages located at? Code: <head> You can then do it like this, base href needs to point to the folder where these pages are located. Code: <a href="pages/edu.html">Education</a> Full link would look like below: Code: https://www.yoursite.com/pages/edu.html It all depends on where these pages are located at. |