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

preLayoutRender Interceptor Bug #115

Merged
merged 4 commits into from
Jan 16, 2013

Conversation

ajmichels
Copy link
Contributor

I was encountering an issue while trying to use the preLayoutRender interceptor. I was noticing that the layout name was not getting passed through. I found that this is because of the way the layout was being determined in the layoutRender method in Renderer.cfc. I updated the file to update the layout name based on the result of the implicitViewChecks().

…preLayoutRender interceptor when the layout is determined implicitly.
… check to make sure the layout string is longer than 4 characters before doing any manipulation to it.
…ayout rendering check to allow for manipulation of the layout via an interceptor.
… with nested layouts. Also added some comments
@lmajano
Copy link
Member

lmajano commented Dec 8, 2012

Hmm, I really don't understand how this works, can you expand on this?

@ajmichels
Copy link
Contributor Author

Basically if the layout was being determined implicitly the "layout name" was not being supplied to the interceptor. My update captures the "layout name" from the implicitViewChecks() method and then assigns it back to the layout argument so that it is available to the interceptor. This is useful so that you can perform logic in your interceptor based on what layout has been requested. Previously this was only possible if you explicitly defined the layout you wanted to use instead of relying on the default. This update also make the preLayoutRender interceptor match up a bit better with the preViewRender method which is always supplied with a view name regardless if whether or not the view is called implicitly or explicitly.

lmajano added a commit that referenced this pull request Jan 16, 2013
@lmajano lmajano merged commit 91d3e7f into ColdBox:development Jan 16, 2013
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.

2 participants