Skip to content

Commit 258d19a

Browse files
committed
Update README
1 parent db75885 commit 258d19a

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Pattern Lab core only supports global data files and a pattern-specific data fil
2121

2222
### Data transform functions
2323

24-
Currently the plugin provides 3 transform functions for the data read by Pattern Lab. The examples provided are in JSON but Pattern Lab supports YAML too!
24+
Currently the plugin provides four transform functions for the data read by Pattern Lab. The examples provided are in JSON but Pattern Lab supports YAML too!
2525

2626

2727
#### Include pattern files
@@ -87,7 +87,29 @@ The value of `key` will be replaced with the joined strings. Note that in the ex
8787
}
8888
```
8989

90-
The value of `key` will be replaced with an [Attribute object](https://www.drupal.org/node/2513632).
90+
The value of `key` will be replaced with an [`Attribute` object](https://www.drupal.org/node/2513632).
91+
92+
93+
#### Create Drupal `Url` objects
94+
95+
```json
96+
{
97+
"key": {
98+
"Url()": {
99+
"url": "http://example.com",
100+
"options": {
101+
"attributes": {
102+
"Attribute()": {
103+
"class": ["link"]
104+
}
105+
}
106+
}
107+
}
108+
}
109+
}
110+
```
111+
112+
The value of `key` will be replaced with an `Url` object. Note that in the example `attributes` will be replaced with an `Attribute` object before the `Url` object is created.
91113

92114

93115
## Global data and includes

0 commit comments

Comments
 (0)