[Take you from scratch to develop a reading site] Chapter 5, front-end template introduction, chapter 5 from scratch
[This project is open-source at: https://gitee.com/input4#/littlerb/tree/v1/]
FreeMarker
The freeMarker template engine is explained in the first part of the official website as follows:
Apache FreeMarker is a template engine: a Java library that generates text output (HTML webpage, email, configuration file, source code, etc.) based on templates and changed data. The template is written in FreeMarker template language (FTL). It is a simple professional language (not a comprehensive programming language like PHP ). Your intention is to prepare data for display in real programming languages, such as querying the problem database and performing business computing, and then the template displays the prepared data. In the template, you will focus on how to present data, and outside the template, you will focus on the data to be displayed.
For more information about how to use freeMarker, you can search for related tutorials on the Internet. This blog series will only explain the used freemarker templates.
The following describes how freemarker is displayed on the homepage of the reading site.
1 <! DOCTYPE html> 2
$ {Vo. getId ()} value from the background object