From 4661dabc2e55096c1dd272267b1ed26fc130306d Mon Sep 17 00:00:00 2001 From: Jon Uhlmann Date: Sat, 22 Aug 2020 15:30:48 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Change=20from=20%content%?= =?UTF-8?q?=20to=20{content}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++--- Resources/Private/Fusion/Internal/Wrapper.fusion | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4feeeeb..d02223e 100755 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ In `Carbon.IncludeAssets.Packages` you can define your packages, which should ou | `Package` | (string) The package key. If it set to `SitePackage`, it will be replaced automatically with the package key from the site package. Defaults to `SitePackage` | | `CacheBuster` | (boolean) Append a hash value from the content of the file. Defaults to `true` | | `ConditionPrototype` | (string) If set, the files get only included if the fusion prototype returns a truthy value. Defaults to `null` | -| `Wrapper` | (string) If set, the generated tags will be wrapped. `%content%` will be replaced with the tags. Example: `''` | +| `Wrapper` | (string) If set, the generated tags will be wrapped. `{content}` will be replaced with the tags. Example: `''` | | `Path` | (array) Define the files get loaded from. There are different paths for inline and linked files. Every type (`css`,`js`, `mjs`, `preloadasset`, `preloadcss`, `preloadscript` or `modulepreload`) can have a different path inside the Resources folder | | `General` | (array) Asset files who get loaded in live and backend view. Contains two entries: `Head` and `Body` | | `Backend` | (array) Asset files that get loaded only in the backend view. Contains two entries: `Head` and `Body` | @@ -167,7 +167,7 @@ This prototype generates your `script`, `style` and `link` tags from the files w | `assetPackage` | (string) The name of the package. (Example: `Jonnitto.Plyr`) Defaults to `null` | | `cacheBuster` | (boolean) Append a hash value from the content of the file. Defaults to the value set in the [`Settings.yaml`](Configuration/Settings.yaml#L32) | | `paths` | (array) The paths to the internal and external files inside the Resources folder. Defaults to the value set in the [`Settings.yaml`](Configuration/Settings.yaml#L34-L46) | -| `wrapper` | (string) If set, the generated tags will be wrapped. `%content%` will be replaced with the tags. Example: `''` | +| `wrapper` | (string) If set, the generated tags will be wrapped. `{content}` will be replaced with the tags. Example: `''` | ### [Carbon.IncludeAssets:File] @@ -179,7 +179,7 @@ The heart of this package. This prototype generates a `script`, `style`, and `li | `assetPackage` | (string) The name of the package. (Example: `Jonnitto.Plyr`) Defaults to `node.context.currentSite.siteResourcesPackageKey` | | `cacheBuster` | (boolean) Append a hash value from the content of the file. Defaults to the value set in the [`Settings.yaml`](Configuration/Settings.yaml#L32) | | `assetPath` | (string) The path to the file inside the Resources folder. Per default, it is set dynamically | -| `wrapper` | (string) If set, the tag will be wrapped. `%content%` will be replaced with the tag. Example: `''` | +| `wrapper` | (string) If set, the tag will be wrapped. `{content}` will be replaced with the tag. Example: `''` | ### [Carbon.IncludeAssets:GoogleFonts] diff --git a/Resources/Private/Fusion/Internal/Wrapper.fusion b/Resources/Private/Fusion/Internal/Wrapper.fusion index 557a849..e157342 100644 --- a/Resources/Private/Fusion/Internal/Wrapper.fusion +++ b/Resources/Private/Fusion/Internal/Wrapper.fusion @@ -2,7 +2,7 @@ prototype(Carbon.IncludeAssets:Internal.Wrapper) < prototype(Neos.Fusion:Value) content = ${value} wrapper = null wrapper.@if.hasContent = ${this.content} - wrapper.@process.split = ${value && Type.isString(value) ? String.split(value, '%content%') : null} + wrapper.@process.split = ${value && Type.isString(value) ? String.split(value, '{content}') : null} nl = ${String.chr(10)} value = ${this.wrapper ? (this.wrapper[0] + this.nl + this.content + this.nl + this.wrapper[1] + this.nl) : this.content}