Knotx / knotx

Knot.x is a highly-efficient and scalable integration framework designed to build backend APIs
https://knotx.io
Apache License 2.0
126 stars 26 forks source link

static fragment data passed to handlebars context #426

Closed scypio closed 5 years ago

scypio commented 6 years ago

Static fragment data passed to the handlebars.

Description

During FragmentContext initialization static data (prefixed with data-const- is now passed stored into the context. Prefix used for these properties is _const. Therefore data attribute data-const-foo can be referenced from handlebars as {{_const.foo}]

Motivation and Context

Better code organization - and solution for some CMS systems that are not able to process the tags inside the fragment.

Implementation of https://github.com/Cognifide/knotx/issues/391

Screenshots (if appropriate):

Types of changes

Checklist:


I hereby agree to the terms of the Knot.x Contributor License Agreement.

scypio commented 6 years ago

@Skejven changelog and upgrade notes updated :)

tomaszmichalak commented 5 years ago

This PR is outdated. Please check Knot.x 2.0 implementation to validate this idea.