An open API service indexing awesome lists of open source software.

https://github.com/jmix-framework/jmix-webcontent


https://github.com/jmix-framework/jmix-webcontent

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          

# Jmix WebContent Addon

Allows to use content stored in database and editable from the admin area

# Installation

1. Checkout this repo
2. build and publish artifacts to your Maven

```
./gradlew publishToMavenLocal
```
3. Select Install Manually from Jmix Addon Manager and insert addon's artifactId

```
io.jmix.webcontent:webcontent-starter:0.0.1
```

# Usage

## Code

By default web content is taken by user selected locale fallbacking to 'en'.
Consider you have div on view with id "instructions" and web content with
the same slug field value:

```
WebContent instructionWebContent = webContentService.findBySlug("instructions");
instructions.getElement().setProperty("innerHTML", instructionWebContent.getContents());
```

## Migrations

To have contents installed automatically, use liquibase changesets as follows:

1. Create new migration changeset
2. Add changeset contents

```xml















```

3. Place your htmls with contents aside the changeset