Add 'Kentico' dialect for Thymeleaf engine

未关闭
#62 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
java
领域
backend

调研方向

首先阅读链接的 Thymeleaf 扩展指南,并检查 SDK 的内联链接项渲染引擎和应用程序渲染引擎的结构。定义该方言的表达式和内容解析器,然后根据设计指南的要求,验证它是否可以在两个渲染上下文中注册。

由索引模型根据 Issue 内容生成。

描述

enhancement groomed hacktoberfest help wanted
Motivation

Say your application needs to show an alert text box in blue or red background depending on the user’s role (admin or non-admin). You can compute this with conditional expressions on your template, but too many conditions could render your code a little bit hard to read …

Solution: create a new Thymeleaf attribute called alertclass and an attribute processor for it (Java code that will compute the right CSS class), and package it into your own MyOwnDialect Thymeleaf dialect. Add this dialect to your template engine with the th prefix (same as the SpringStandard dialect) and you’ll now be able to use th:alertclass="${user.role}".

(Taken from the docu.)

Design guidelines

This Thymeleaf dialect should provide various expressions and content resolvers to simplify usage of KenticoCloud objects from within Thymeleaf. This dialect can be registered by an application's Thymeleaf rendering engine, as well as should be registered in the inline linked items rendering engine provided with the SDK.

Reference
主要语言
Java
星标
17
派生
27
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

kontent-ai/java-packages 的其他 Issue

查看 kontent-ai/java-packages 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。