Welcome Guest, Not a member yet? Register   Sign In
[Fixed] Smarty + CodeIgniter = extra text
#8

(01-07-2015, 09:30 AM)mwhitney Wrote: Are you using a Smarty library which was designed to work with CodeIgniter, or just trying to get them to work together yourself? Generally, the output of a template library is going to have be passed to CI's Output class or the library will need to use a display_override hook to bypass CI's output.

(01-07-2015, 04:07 PM)Jamie Wrote:
(01-07-2015, 03:31 PM)WibbenZ Wrote: Getting really tierd of the "approve message thingi".. Is there some other codeigniter forum that has good members with knowledge?
Ive found a couple, and tried them none has worked as of now, just tried one before I updated the page.

The thing is, that I suspect the only thing that is needed to do is to disable the codeigniter's "auto-loading-template" function, since I handle that from Smarty now insted.
Someone must know where that function is, what more could be needed to change?

To be fair the information you've provided is pretty vague, we can see you're using Smarty and CI, however without knowing what Smarty library you're using it makes giving an answer much more difficult.

If any changes are needed to the CI setup this should be in the installation documentation for the library providing the developer has documented it correctly.

If you could help identify which library you are using we will be able to assist further Smile

The approve messages feature is in place to deter spammers, after a few approved posts you will be free to post normally.

You should also note that CI doesn't use a template class since using pure PHP in your view pages lets them run a little faster. Therefore there is no "auto-loading-template" function to disable Smile

Thanks for the awnser, finally feels like someone has some knowledge about this haha.. Shy
Its the latest one from github - https://github.com/smarty-php/smarty.

About the information, well I really don't know how to explain it any more then I have, when I use CI + Smarty = the code from the view page is shown twice, once above the head code in my template file and in the "content" part of the webiste, as the image shows.
When I tried to remove Smarty I still got the content from my home.php file, that is what I ment by template (just realized it haha) - I want Smarty to handle pretty much everything - or atleast let Smarty assign a variable that I can use in my layout.

So simply updated, I need to remove the ability for CI to show the content from my home.php view file and let the Smarty variable store it till I wanna load the "content" part of the layout.
:p
Reply


Messages In This Thread
RE: Smarty + CodeIgniter = extra text - by Jamie - 01-07-2015, 04:07 PM
RE: Smarty + CodeIgniter = extra text - by WibbenZ - 01-07-2015, 05:22 PM
RE: Smarty + CodeIgniter = extra text - by Rufnex - 01-09-2015, 11:26 AM
RE: Smarty + CodeIgniter = extra text - by Rufnex - 01-09-2015, 11:30 AM
RE: Smarty + CodeIgniter = extra text - by Rufnex - 01-12-2015, 07:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB