Skip to content

Commit 80403b2

Browse files
committed
[DOC] Improve documentation for named slots
1 parent 433e7e2 commit 80403b2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Documentation/DataStructures.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,11 @@ Fluid Component `Molecule/TeaserCard/TeaserCard.html`:
411411
<my:molecule.teaserCard buttons="<button>read more about ABC</button>{insecure}" />
412412
```
413413

414-
You can also use the `<fc:content />` ViewHelper to specify HTML markup more easily:
414+
### Named Slots
415+
416+
With v3.7.0 of Fluid Components you can use the `<fc:content />` ViewHelper to specify HTML markup for
417+
slots more easily. This makes your templates more readable and can prevent possible XSS issues. The
418+
syntax is similar both to popular frontend frameworks and the HTML5 web components specification.
415419

416420
```xml
417421
<my:molecule.teaserCard>

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The following component implements a simple teaser card element:
4949
<a href="{link}" class="{component.class} {component.class}-{theme}">
5050
<h3 class="{component.prefix}title">{title}</h3>
5151
<f:if condition="{content}">
52-
<p class="{component.prefix}description">{fc:slot()}</p>
52+
<p class="{component.prefix}description"><fc:slot /></p>
5353
</f:if>
5454

5555
<f:if condition="{icon}">

0 commit comments

Comments
 (0)