[DOCU-357] Write JSP examples for introduction to templating tutorial Created: 02/Mar/12 Updated: 07/May/15 Resolved: 07/Dec/12 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | content |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Antti Hietala | Assignee: | Philipp Bärfuss |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Write JSP examples for the Introduction to templating tutorial. The tutorial already has Freemarker examples. JSP examples are missing towards the end of the article. |
| Comments |
| Comment by Zsombor Varga [ 07/Dec/12 ] |
|
For "Rendering page content": <%@ taglib prefix="cms" uri="http://magnolia-cms.com/taglib/templating-components/cms" %> <html> <head> <cms:init/> <title>${content.title}!</title> </head> <body> <h1>${content.title}</h1> <p>${content.text}</p> </body> </html> |
| Comment by Zsombor Varga [ 07/Dec/12 ] |
|
For "Rendering the area in the page script": <%@ taglib prefix="cms" uri="http://magnolia-cms.com/taglib/templating-components/cms" %> <html> <head> <cms:init/> <title>${content.title}!</title> </head> <body> <h1>${content.title}</h1> <p>${content.text}</p> <cms:area name="main" /> </body> </html> |
| Comment by Zsombor Varga [ 07/Dec/12 ] |
|
For "Creating an area script": <%@ taglib prefix="cms" uri="http://magnolia-cms.com/taglib/templating-components/cms" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <c:forEach items="${components}" var="component"> <cms:component content="${component}" /> </c:forEach> |
| Comment by Zsombor Varga [ 07/Dec/12 ] |
|
For "Creating a component script": <p>
${content.text}
</p>
|
| Comment by Antti Hietala [ 07/Dec/12 ] |
|
Thank you for the examples. Added to http://documentation.magnolia-cms.com/templates/introduction.html |