Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/openweb-nl/hippo-structured-data-plugin

This is an hst (Hippo site toolkit) addon to providing structured data using json-ld.
https://github.com/openweb-nl/hippo-structured-data-plugin

hippo structured-data

Last synced: about 1 month ago
JSON representation

This is an hst (Hippo site toolkit) addon to providing structured data using json-ld.

Awesome Lists containing this project

README

        

# Structured data addon for Hippo
This is an hst addon to providing structured data using json-ld.

## Usage
* Add Open Web repository, and structured-data dependency to Hippo Site
```XML

nl.openweb.hippo.hst
structured-data
13.0.X

```

* Create mapper classes implementing the interface: *nl.openweb.structured.data.schema.mapping.StructuredDataMapper*

* Register them in spring
```XML


```
* Define the tag in your jsp
```JSP
<%@ taglib prefix="sd" uri="http://open-web.nl/hippo/structured-data"% >
```

*or freemarker:*
```FTL
<#assign sd=JspTaglibs ["http://open-web.nl/hippo/structured-data"] >
```

## Tags to use for immediate rendering
To map the current contentbean in your jsp
```JSP

```
or freemarker:
```FTL
<@sd.ldJson />
```
*It's also possible to define the object and use a named mapper in your jsp*
```JSP

```
or freemarker:
```FTL
<@sd.ldJson bean=breadcrumbList mapper=breadcrumbList/>
```

### Tags for Asynchronous rendering
To use this plugin in an asynchronous matter, as headContributions of hippo, use these tags.
*As with the original tag, the bean and mapper attributes are optional.*

for JSP:
```JSP

```
for freemarker:
```FTL
<@sd.ldJsonContribution bean=bean mapper=myBeanMapper/>
<@sd.structuredDataPlaceholder/>
```