티스토리 뷰
플러그인 다운로드는 여기서 --> http://freemarker.org/editors.html
feemarker 다운로드는 여기서 --> http://freemarker.org/freemarkerdownload.html
Overall structure
Templates are in fact programs you write in a language called FTL (for FreeMarker Template Language). This is a quite simple programming language designed for writing templates and nothing else.
A template (= FTL program) is a mix of the following sections:
-
Text: Text that will be printed to the output as is.
-
Interpolation: These sections will be replaced with a calculated value in the output. Interpolations are delimited by ${ and } (or with #{ and }, but that shouldn't be used anymore; see more here).
-
FTL tags: FTL tags are a bit similar to HTML tags, but they are instructions to FreeMarker and will not be printed to the output.
-
Comments: Comments are similar to HTML comments, but they are delimited by <#-- and -->. Comments will be ignored by FreeMarker, and will not be written to the output.
Let's see a concrete template. I have marked the template's components with colors: text, interpolation, FTL tag, comment. With the [BR]-s I intend to visualize the line breaks.
|
|||
FTL distinguishes upper case and lower case letters. So list is good directive name, while List is not. Similarly ${name} is not the same as ${Name} or ${NAME}
It is important to realize that interpolations can be used in text (and in string literal expressions; see later) only.
An FTL tag can't be inside another FTL tag nor inside an interpolation. For example this is WRONG: <#if <#include 'foo'>='bar'>...</#if>
Comments can be placed inside FTL tags and interpolations. For example:
|
|||
Note
For those of you who have tried the above examples: You may notice that some of spaces, tabs and line breaks are missing from the template output, even though we said that text is printed as is. Don't bother with it now. This is because the feature called ''white-space stripping'' is turned on, and that automatically removes some superfluous spaces, tabs and line breaks. This will be explained later.
- Total
- Today
- Yesterday
- 한남동세일
- 와코마리아 스웨터
- 부드러운맛
- 와코마리아한남동
- 안드로이드
- eclipse
- javascript
- 인도
- 새희망씨앗
- 기부사기
- 페밀리세일
- 홈택스
- VirtureBox
- 6월 패밀리세일
- 사업자등록
- 나이지리아
- 와코마리아
- MySQL
- 라고스
- 기부피해
- UML
- 단체소송
- 새희망씨앗 피해자
- 마라탕 #마라상궈 #마라탕재료 #쉽게만드는마라탕 #중딩입맛 #마라탕잡탕
- 와코마리아팸세일
- 리터너블
- 해외직구
- 팸세일
- 패밀리세일
- java
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |