[MAGNOLIA-3234] Make it possible to skip rendering Created: 23/Jun/10 Updated: 13/Mar/12 Resolved: 30/Jun/10 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | templating |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.3, 4.4 |
| Type: | Task | Priority: | Major |
| Reporter: | Federico Grilli | Assignee: | Federico Grilli |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoR: |
Empty
|
||||||||||||
| Date of First Response: | |||||||||||||
| Description |
|
When realizing the new redirect functionality the need arose for skipping the rendering of templates under certain conditions. This can be achieved by skipping the call to the onRender(..) method in AbstractRenderer.render(..) method when the determineTemplatePath(..) method for a certain template returns null. So far, this caused an IllegalStateException but now this should not be the case anymore and a null templatePath would simply mean 'do not render anything'. |
| Comments |
| Comment by Magnolia International [ 24/Jun/10 ] |
|
needs to be merged to trunk |
| Comment by Philipp Bärfuss [ 24/Jun/10 ] |
|
Federico says:
|
| Comment by Philipp Bärfuss [ 24/Jun/10 ] |
|
So instead we should introduce a special actionResult (value returned by mode.execute()) which will skip the rendering. if(!skipRendering(actionResult)){ Unfortunately this value cannot be null or "" as this are the default values. So use "skip-rendering". Benefits:
We could even go as far as supporting the same pattern as for virtual URIs -> "redirect:URI", "forward:URI" |