[solved] Why is the Pagination class adding a doctype to my page? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: [solved] Why is the Pagination class adding a doctype to my page? (/showthread.php?tid=27375) |
[solved] Why is the Pagination class adding a doctype to my page? - El Forum - 02-09-2010 [eluser]jzbruno[/eluser] Hello, I am new to Codeigniter and so far I am really enjoying it. I have ran into a problem though. When I load the pagination class it adds the following html to the top of my page. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> I have narrowed it down to putting nothing but the following in the controller and getting the above html. Code: function index() { Is this normal behavior? If so is there a way around it? Thanks. [solved] Why is the Pagination class adding a doctype to my page? - El Forum - 02-09-2010 [eluser]maria clara[/eluser] you can check the user_guide here: Pagination Class or you can look at this thread for reference: http://ellislab.com/forums/viewthread/143280/ cheers, kahtrina [solved] Why is the Pagination class adding a doctype to my page? - El Forum - 02-09-2010 [eluser]jzbruno[/eluser] Thanks for the reply. I read through the links you posted and am not seeing an answer. Just to clarify. I am not asking how pagination works, I have it working perfectly. I am also not asking how to add the html. I am asking WHY is the pagination class adding that html when I load the library? [solved] Why is the Pagination class adding a doctype to my page? - El Forum - 02-11-2010 [eluser]jzbruno[/eluser] Can someone try this for me and see if they get the same result? Just create a controller and load the pagination library. Thanks. [solved] Why is the Pagination class adding a doctype to my page? - El Forum - 02-11-2010 [eluser]John_Betong[/eluser] [quote author="jzbruno" date="1265966631"]Can someone try this for me and see if they get the same result? Just create a controller and load the pagination library. Thanks.[/quote] I tried it and did not encounter any problems. Can you: 1. expand your index(...) function 2. create a "pagination_test_view.php" view file 3. call $this->load->view('pagination_test_view'); 4. show us the results. I am using the the latest CodeIgniter SVN Version: 1811 [solved] Why is the Pagination class adding a doctype to my page? - El Forum - 02-11-2010 [eluser]jzbruno[/eluser] Thanks for giving it a try. This is very weird, I even started digging through the CodeIgniter source with no luck. I created the following controller. Code: <?php And this view. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" With this output (viewing source in Firefox). Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> I am using CodeIgniter 1.7.2 from the site download. [solved] Why is the Pagination class adding a doctype to my page? - El Forum - 02-11-2010 [eluser]jzbruno[/eluser] I figured it out. At one point I was going to put the pagination $config in pagination.php in the config folder. I created the file with Dreamweaver which gives you a default html page but only saved it and didn't actually put the config in there. Sorry for the trouble. [solved] Why is the Pagination class adding a doctype to my page? - El Forum - 02-12-2010 [eluser]John_Betong[/eluser] [quote author="jzbruno" date="1265975607"]I figured it out. At one point I was going to put the pagination $config in pagination.php in the config folder. I created the file with Dreamweaver which gives you a default html page but only saved it and didn't actually put the config in there. Sorry for the trouble.[/quote] I am pleased you managed to solve your problem and especially in providing the solution. |