Loading multiple views doesn't work |
[eluser]CoderReborn[/eluser]
In my main controller I end with: Code: ... The "header_view" file includes the html headers (including my CSS and JS files). The "contents_view" and "footer_view" files do not include the <header> element. I can get the first two views to load, but loading "footer_view" results in the following error: Quote:An Error Was Encountered Here's the code for the footer: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> I've seen Chuck Son's post on the wiki http://codeigniter.com/wiki/Chuck_Son's_take/ , but there are some controllers where I don't want the footer to be displayed afterwards (e.g. in controllers that process forms). Thanks for your help!
[eluser]pam81[/eluser]
Hi, iuse to load multiple views like you describe but I don't include de doctype or body because at the end you are trying to create a page with three views so HEADER <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html > <!-- see it close on the footer--> <head> <title> </title> ... </head> CONTENT <body> <!-- see it close on the footer--> <div id="content"> </div> FOOTER <div id="footer"> <div class="footer-holder"> <!-- navigation --> <ul class="bottom-nav"> <li><a href="#">About Us</a></li> <li><a href="#">Terms of Service</a></li> <li><a href="#">Privacy Policy</a></li> <li><a href="#">Contact Us</a></li> </ul> <p>Copyright © 2010 My Company Inc., All Rights Reserved</p> </div> </div> </body> </html>
[eluser]CoderReborn[/eluser]
To clarify, the "header_view" file includes html headers AND the main navigation elements in the <body>. So, how would this be done since "header_view" and "contents_view" body contain elements inside <body>? Thanks! |
Welcome Guest, Not a member yet? Register Sign In |