Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for rendering partial views #27

Merged
merged 2 commits into from
Jul 5, 2012
Merged

Fixes for rendering partial views #27

merged 2 commits into from
Jul 5, 2012

Conversation

jerejones
Copy link
Contributor

This changes a lot of the render methods to return strings instead of directly calling setContent. It does result in some repetitive code which could probably be refactored to be cleaner. I'm happy to do that if you would like.

The benefit of that is that partial views can render without calling setContent. They do have to be echo'd now which is a change to their usage, but I just couldn't think of a solution that kept their current usage without rewriting the entire thing. I took the easy way out. :)

I also added a test case for multiple partial views and modified the rest of the views tests so that they pass on Windows. Using PHP_EOL instead of a hard coded "\n" should let them pass on Linux and Windows.

Only external change is that partials must be echoed.  They don't output
themselves.
phalcon pushed a commit that referenced this pull request Jul 5, 2012
Fixes for rendering partial views
@phalcon phalcon merged commit 5018ddb into phalcon:master Jul 5, 2012
@phalcon
Copy link
Collaborator

phalcon commented Jul 5, 2012

Hi Jere, thanks for this fix, also, i believe there is a problem with PHP_EOL, check: http://travis-ci.org/#!/phalcon/cphalcon/builds/1785455

@jerejones
Copy link
Contributor Author

I also notice the other failures. I didn't run those tests. I will figure out and fix those problems after I get off work.

ovr pushed a commit to ovr/cphalcon that referenced this pull request Dec 25, 2013
Fix files missing in new projects
@kcloze kcloze mentioned this pull request Jul 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants