[solved]Navigation Menu - loading other pages? |
[eluser]brucebat[/eluser]
Hi all, I have built my template for codeigniter which consists of: controller ================= site_controller.php (contains index, blog, submit form, retrieve form, login, logout functions) template structure ================== template_view.php header_view.php nav_view.php footer_view.php widgets_view.php =================== fillers for template: home.php blog.php submit_data.php retrieve_data.php login.php =================== models =================== blog_model.php submit_model.php retrieve_model.php --------------------------------------- My question is how do I call my other functions w from my navigation menu on my website. http://i.imgur.com/Eo9it.jpg I have tried this but it causes my page to stop displaying Code: <a >load->controller('site', $page); ?>">Login</a></li> I think I have missed out on something but I have searched and with my ignorance of the terminology and dogma of this system; have not been able to find an answer for what I need to do to get this crucial part of my site working. Perhaps a point in the right direction would be beneficial in my learning of this framework rather than a straight out answer ? Thankyou for your time !
[eluser]InsiteFX[/eluser]
url_helper anchor tag in the CodeIgniter User Guide! InsiteFX
[eluser]brucebat[/eluser]
So if i Wanted to activate a function from a Controller using the anchor for example : controller = site.php function = login() echo anchor('controller/site/login', 'Login', 'title="Login"'); ?? Thanks
[eluser]brucebat[/eluser]
That is not working though it is saying this: Quote:<h4>A PHP Error was encountered</h4>============================== Quote:<h4>A PHP Error was encountered</h4> ============================== Quote:<h4>A PHP Error was encountered</h4> ============================== Quote:<h4>A PHP Error was encountered</h4> ==================== Then when I click on the link I get a strange url Code: http://localhost/midas/<div style=
[eluser]brucebat[/eluser]
This is my nav.php code Quote:<div id="menu"> **Note I changed the "a" = $$ so that I could post it
[eluser]cideveloper[/eluser]
ok here we go 1) do not use the quote tags when submitting code. use the code tags, that way you can put whatever you want. 2) you don't put the anchor helper inside an anchor. The anchor helper builds your anchor. Code: <div id="menu">
[eluser]brucebat[/eluser]
Thankyou very much cideveloper, I feel kind of silly now. To answer why I did not put in code tags as it would not allow me to post my html because I do not have enough privileges yet. There is one last problem which Is annoying me. There appears to be a set of closing php tags "?>" which are appearing on my page and I can't think where they are coming from. Here is my validation html to show you http://validator.w3.org/check?uri=http:/...idator/1.2 I have checked all my includes and main content php files but I cant think where it is coming from? Any ideas
[eluser]cideveloper[/eluser]
The only way you will have an extra "?>" is if you have a double closing tag somewhere. I would check your footer. Also Whats up with your host? why is your site under review. |
Welcome Guest, Not a member yet? Register Sign In |