[eluser]mycroes[/eluser]
[quote author="SitesByJoe" date="1225441851"]
Quote:I seriously don’t consider your code a viable solution. Besides the fact that I very often pass data along to views, I just want to be able to use CI without these kind of hacks.
Please explain what I'm hacking here. I just tried to post a simple example to solve a simple problem.[/quote]
There's no way to manipulate view data anymore, except by setting it globally (which logically isn't always desired and sometimes even impossible without editing views). The example is quite simple, but it doesn't solve my problem... That could mean my problem is too complex (and I think it's at least not just any simple problem) or that your solution is too simple. Maybe a hack isn't the right word, I think workaround would be better suited, that also in one word says it's not the fix (not for my issue at least).
[quote author="SitesByJoe" date="1225441851"]
Quote:Currently my code works, as long as I load views and don’t echo any content. Also show_404 doesn’t work, but I guess there’s something strange with codeigniter going on here…
Sorry to bring this up again, but speaking of hacks?!? I'm not gonna argue code - I'm real impressed with the fact you can perform so many manipulations, but geez - your solution is rather verbose considering it simply adds content to a view.
[/quote]
I'm using about as much code as (minimally) needed, preserving wanted functionality without adding unneeded code. I'm also preserving all functionality inside the controller, so I don't think my code has anything to do with being a hack... I wouldn't consider the file verbose, it's actually lacking comments which should really be in every file... Of course I could shave about 10 lines off, preserving the same functionality, but making the code harder to read/understand (especially without those comments
).
[quote author="SitesByJoe" date="1225441851"]Perhaps I shouldn't even be defending this, but isn't the point of code igniter to do alot with a little code?[/quote]
I think the point of code igniter is to code efficient and effective, not necessarily to do a lot with little code... If I'm wrong, it's time for a fork().