Skip to content

Commit

Permalink
fix: faraday generation
Browse files Browse the repository at this point in the history
  • Loading branch information
kpanot committed Oct 17, 2024
1 parent 44a14f2 commit 566bff6
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions docs/components/PLACEHOLDERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@ The component only has 1 input and supports a *content value*.

## Supported features

* HTML limited to behaviour supported by Angular sanitizer
* URLs (relative ones will be processed to add the `dynamic-media-path`)
* Facts references
* Dynamic translation
- HTML limited to behaviour supported by Angular sanitizer
- URLs (relative ones will be processed to add the `dynamic-media-path`)
- Facts references
- Dynamic translation

## How it works

Based on the `id` provided to the placeholder component, it will register itself to the event coming from `placeholderTemplate`
and will display the template corresponding to its ID in the store.

> [!IMPORTANT]
>
> It is **strongly encouraged** to use the placeholder mechanism in concert with the [Rules Engine](../rules-engine/README.md).
## How to define a placeholder template
Expand Down Expand Up @@ -89,6 +88,7 @@ export class MyComponentModule {
export class MyComponent {
}
```

The loading message is provided by projection. Feel free to provide a spinner if you need.

### How to generate placeholder metadata
Expand Down Expand Up @@ -204,7 +204,7 @@ Then, let's create a new localization key for each of your supported languages:

```json
{
"o3r-increment-key": "Cela fait {increment, plural, =1 {1 seconde}} other {{{increment} secondes} que tu as ouvert cette page"
"o3r-increment-key": "Cela fait {increment, plural, =1 {1 seconde} other {{{increment}} secondes}} que tu as ouvert cette page"
}
```

Expand Down Expand Up @@ -298,7 +298,6 @@ Thanks to the parameters map you can use fact variables with JSONPath in localiz

#### Variable support for localization variables (DEPRECATED)


Before, localization variables could reference facts via variables instead of parameters. This feature is currently deprecated and will be removed from Otter v12 as it is replaced by the parameters explained above.

``en-GB.json``
Expand Down Expand Up @@ -408,7 +407,6 @@ displayed in descending order of priority.
The placeholder component waits for all the calls to be resolved (not pending) to display the content.
The placeholder component ignores a template if the application failed to retrieve it.


## Reference CSS classes from an external styling file

You need to reference one or several CSS files from your application in the `cms.json` file:
Expand Down Expand Up @@ -438,7 +436,6 @@ You can include this file in your application using the style loader service in
this.styleLoader.asyncLoadStyleFromDynamicContent({id: 'placeholders-styling', href: 'assets/rules/placeholders.css'});
```


## Investigate issues

If the placeholder is not rendered properly, you can perform several checks to find out the root cause, simply looking
Expand Down

0 comments on commit 566bff6

Please sign in to comment.