Thymeleaf Extras Togglz

Thymeleaf dialect integrating Togglz feature toggles.

Лицензия

Лицензия

Категории

Категории

Leaf Данные Базы данных
Группа

Группа

com.github.heneke.thymeleaf
Идентификатор

Идентификатор

thymeleaf-extras-togglz
Последняя версия

Последняя версия

2.0.1.RELEASE
Дата

Дата

Тип

Тип

jar
Описание

Описание

Thymeleaf Extras Togglz
Thymeleaf dialect integrating Togglz feature toggles.
Ссылка на сайт

Ссылка на сайт

https://github.com/heneke/thymeleaf-extras-togglz
Система контроля версий

Система контроля версий

https://github.com/heneke/thymeleaf-extras-togglz/tree/master

Скачать thymeleaf-extras-togglz

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.heneke.thymeleaf/thymeleaf-extras-togglz/ -->
<dependency>
    <groupId>com.github.heneke.thymeleaf</groupId>
    <artifactId>thymeleaf-extras-togglz</artifactId>
    <version>2.0.1.RELEASE</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.heneke.thymeleaf/thymeleaf-extras-togglz/
implementation 'com.github.heneke.thymeleaf:thymeleaf-extras-togglz:2.0.1.RELEASE'
// https://jarcasting.com/artifacts/com.github.heneke.thymeleaf/thymeleaf-extras-togglz/
implementation ("com.github.heneke.thymeleaf:thymeleaf-extras-togglz:2.0.1.RELEASE")
'com.github.heneke.thymeleaf:thymeleaf-extras-togglz:jar:2.0.1.RELEASE'
<dependency org="com.github.heneke.thymeleaf" name="thymeleaf-extras-togglz" rev="2.0.1.RELEASE">
  <artifact name="thymeleaf-extras-togglz" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.heneke.thymeleaf', module='thymeleaf-extras-togglz', version='2.0.1.RELEASE')
)
libraryDependencies += "com.github.heneke.thymeleaf" % "thymeleaf-extras-togglz" % "2.0.1.RELEASE"
[com.github.heneke.thymeleaf/thymeleaf-extras-togglz "2.0.1.RELEASE"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.thymeleaf : thymeleaf jar 3.0.1.RELEASE
org.togglz : togglz-core jar 2.3.0.Final

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.8.2
org.togglz : togglz-testing jar 2.3.0.Final
org.thymeleaf : thymeleaf-testing jar 3.0.1.RELEASE

Модули Проекта

Данный проект не имеет модулей.

Thymeleaf Togglz dialect

Thymeleaf dialect that integrates Togglz feature toggles (www.togglz.org) and the Thymeleaf template engine (www.thymeleaf.org).

Requirements

  • Thymeleaf
    • 2.1.x (works with older 2.0.x versions - see remark regarding expression evaulation) - using thymeleaf-extras-togglz version 1.x
    • 3.x - using thymeleaf-extras-togglz version 2.x
  • Togglz 2.3.x (works with older 2.x versions)

Usage

Add an instance of com.github.heneke.thymeleaf.togglz.TogglzDialect to your Thymeleaf template engine. In your templates, you may now use

<div togglz:active="YOUR_FEATURE_NAME">
    content only visible if feature is active
</div>
<div togglz:inactive="YOUR_FEATURE_NAME">
    content only visible if feature is <b>inactive</b>
</div>

to show/hide the markup container based on feature state.

Optionally, you may add an XML namespace to your <html> tag, to suppress warnings in your IDE:

<html lang="en"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:togglz="https://github.com/heneke/thymeleaf-extras-togglz">

Until recently, the expression processor for togglz:active did not support expressions. Since it does so now, you have to use

<div togglz:active="'YOUR_FEATURE_NAME'">
    content only visible if feature is active
</div>
<div togglz:inactive="'YOUR_FEATURE_NAME'">
    content only visible if feature is <b>inactive</b>
</div>
```

when using Thymeleaf 2.0.x. Thymeleaf 2.1 does support string literals without single quotes as explained in the usage section (see http://www.thymeleaf.org/whatsnew21.html#littok).

Версии библиотеки

Версия
2.0.1.RELEASE
2.0.0.RELEASE
1.2.0.RELEASE
1.1.0.RELEASE
1.0.1.RELEASE
1.0.0.RELEASE