CodeIgniter Forums
Loading multiple views in a controller is adding Returns [Enter key] - 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: Loading multiple views in a controller is adding Returns [Enter key] (/showthread.php?tid=38113)



Loading multiple views in a controller is adding Returns [Enter key] - El Forum - 01-30-2011

[eluser]cicovy[/eluser]
Hi,Can someone tell me how to get rid of the returns when loading multiple views in a controller? I am loading a header, a menu and a content from views/partial/ and between them, there is a return, a line break which is causing my HTML to move with one line... Thanks!


Loading multiple views in a controller is adding Returns [Enter key] - El Forum - 01-30-2011

[eluser]Cristian Gilè[/eluser]
Please, post the code.


Cristian Gilè


Loading multiple views in a controller is adding Returns [Enter key] - El Forum - 01-31-2011

[eluser]cicovy[/eluser]
I figured it out. After each view loaded, there was a dash "-" added. Does someone knows why? The encoding type was set to UTF-8. When switched to ANSI, that dash was gone and the page layout displayed properly.

Any thoughts?

Thanks!


Loading multiple views in a controller is adding Returns [Enter key] - El Forum - 01-31-2011

[eluser]InsiteFX[/eluser]
Set encoding in editor to NO BOM

InsiteFX


Loading multiple views in a controller is adding Returns [Enter key] - El Forum - 01-31-2011

[eluser]cicovy[/eluser]
That didn't help either...


Loading multiple views in a controller is adding Returns [Enter key] - El Forum - 01-31-2011

[eluser]InsiteFX[/eluser]
What editor are you using?

Notepad++ does not work write for editing php files.

InsiteFX


Loading multiple views in a controller is adding Returns [Enter key] - El Forum - 01-31-2011

[eluser]cicovy[/eluser]
Actually, Notepad++ is what I use for small files from the views and PHPDesigner 7 when dealing with controllers and models... I thinks I will always edit my files in Zend or PHPDesigner from now on.

Thanks, it worked after saving all files in PHPDesigner.