We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
main.jetx
#tag block("bodyContent1") BODY 1111 #end #tag block("bodyContent2") BODY 2222 #end #include ("layout.jetx")
layout.jetx
This is a header. <div> ${bodyContent1} </div> <div> ${bodyContent2} </div> This is a footer.
输出结果:
This is a header. <div> BODY 1111 </div> <div> BODY 2222 </div> This is a footer.
The text was updated successfully, but these errors were encountered:
/** * 将一个 Block 的内容保存到一个 Context 变量中。 * * @param ctx Tag 上下文对象 * @param name 保存到 JetContext 的变量名 */ public static void block(JetTagContext ctx, String name) { String bodyContent = ctx.getBodyContent(); ctx.getContext().put(name, bodyContent); }
Sorry, something went wrong.
a0e6dbc
subchen
No branches or pull requests
main.jetx
layout.jetx
输出结果:
The text was updated successfully, but these errors were encountered: