Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

[Fixed] Smarty + CodeIgniter = extra text

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
WibbenZ
Smarty n00b


Joined: 11 Jan 2015
Posts: 3

PostPosted: Sun Jan 11, 2015 5:15 pm    Post subject: [Fixed] Smarty + CodeIgniter = extra text Reply with quote



Hey hope someone here can help me with this issue.

As you can see on the image above, I have taken 3 screens.
First one is without Smarty, second one is without CodeIgniter and the third is with both on.
As you might have noticed the text "Welcome" (the index.php view) is displayd above the head code aswell as in the "content" part of the website.

What I need to know is how I can remove the first "Welcome" above the menu. Since I use a smarty command to assign the text from ob_get_contents() and then use that command in my layout.php file.
Note that I only use one layout.tpl, not 3 (header, content, footer).
Regards


Last edited by WibbenZ on Mon Jan 12, 2015 10:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
WibbenZ
Smarty n00b


Joined: 11 Jan 2015
Posts: 3

PostPosted: Mon Jan 12, 2015 4:20 pm    Post subject: Reply with quote

Still no responds? :s
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Mon Jan 12, 2015 9:37 pm    Post subject: Reply with quote

If the "Welcome" was echoed into an output buffer ob_get_contents() does return a copy of the buffer but does not clear it.

Maybe ob_get_clear() will solve your problem.
Back to top
View user's profile Send private message
WibbenZ
Smarty n00b


Joined: 11 Jan 2015
Posts: 3

PostPosted: Mon Jan 12, 2015 10:39 pm    Post subject: Reply with quote

U.Tews wrote:
If the "Welcome" was echoed into an output buffer ob_get_contents() does return a copy of the buffer but does not clear it.

Maybe ob_get_clear() will solve your problem.


Wtf...
It was called ob_get_clean() but other then that it fixed my problems..
Been trying to fix this for 6 days and its that easy.........
THANK YOU! haha Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP