diff --git a/content/collections/modifiers/ampersand_list.md b/content/collections/modifiers/ampersand_list.md index aa200673c..27bd61435 100644 --- a/content/collections/modifiers/ampersand_list.md +++ b/content/collections/modifiers/ampersand_list.md @@ -13,6 +13,10 @@ related_entries: --- Turn a simple array into a comma delimited string with a friendly little ampersand between the last two items. +:::tip +`ampersand_list` and [Sentence List](/modifiers/sentence_list) share functionality so things like setting the glue and/or oxford comma work the same in both modifiers. +::: + ```yaml fruits: - apples diff --git a/content/collections/modifiers/dl.md b/content/collections/modifiers/dl.md index 82da1c1c3..3af391614 100644 --- a/content/collections/modifiers/dl.md +++ b/content/collections/modifiers/dl.md @@ -5,9 +5,20 @@ modifier_types: - array - markup title: DL +related_entries: + - 327f4a3b-04d4-4069-881a-fe50ddb9be23 + - 85910466-876b-4fc7-9dd1-c9baa7f7870a --- Turn a key/value array, otherwise known as a YAML mapping, into an HTML definition list. +:::hot tip +`dl` accepts colon delimited key:value pairs to pass attributes to the `
` element; you cannot pass attributes to the `
`or `
`> elements. + +```antlers +{{ food | dl('class:green', 'disabled:') }} +``` +::: + ```yaml food: Delicious: @@ -40,4 +51,4 @@ food:
broccoli
kale
-``` +``` \ No newline at end of file diff --git a/content/collections/modifiers/image.md b/content/collections/modifiers/image.md index 61e644833..2aeb9a4eb 100644 --- a/content/collections/modifiers/image.md +++ b/content/collections/modifiers/image.md @@ -18,12 +18,15 @@ header_image: /assets/img/bokeh-bunnies.jpg ::tab antlers ```antlers {{ header_image | image }} +{{ header_image | image('class:width-50') }} ``` ::tab blade ```blade {!! Statamic::modify($header_image)->image() !!} +{!! Statamic::modify($header_image)->image('class:width-50') !!} ``` :: ```html + ``` diff --git a/content/collections/modifiers/link.md b/content/collections/modifiers/link.md index 8d8dd7d8a..25b010d13 100644 --- a/content/collections/modifiers/link.md +++ b/content/collections/modifiers/link.md @@ -17,13 +17,19 @@ neat_site: http://example.com ::tab antlers ```antlers {{ neat_site | link }} +{{ neat_site | link('title:Visit my site!') }} +{{ neat_site | link('class:awesome-link') }} ``` ::tab blade ```blade -{{ Statamic::modify($neat_site)->link() }} +{!! Statamic::modify($neat_site)->link() !!} +{!! Statamic::modify($neat_site)->link('title:Visit my site!') !!} +{!! Statamic::modify($neat_site)->link('class:awesome-link') !!} ``` :: ```html http://example.com -``` +Visit my site! +http://example.com +``` \ No newline at end of file diff --git a/content/collections/modifiers/mailto.md b/content/collections/modifiers/mailto.md index 95d63a796..053ba904e 100644 --- a/content/collections/modifiers/mailto.md +++ b/content/collections/modifiers/mailto.md @@ -17,13 +17,19 @@ holler: holler@example.com ::tab antlers ```antlers {{ holler | mailto }} +{{ holler | mailto('class:text-white bg-brown') }} +{{ holler | mailto('class:text-white', 'data-tracking:true') }} ``` ::tab blade ```blade -{{ Statamic::modify($holler)->mailto() }} +{!! Statamic::modify($holler)->mailto() !!} +{!! Statamic::modify($holler)->mailto('class:text-white') !!} +{!! Statamic::modify($holler)->mailto('class:text-white', 'data-tracking:true') !!} ``` :: ```html holler@example.com -``` +holler@example.com +holler@example.com +``` \ No newline at end of file diff --git a/content/collections/modifiers/ol.md b/content/collections/modifiers/ol.md index a491fd4f0..cecaad88e 100644 --- a/content/collections/modifiers/ol.md +++ b/content/collections/modifiers/ol.md @@ -5,9 +5,20 @@ modifier_types: - array - markup title: OL +related_entries: + - fbdb7bf5-ac19-444c-9536-57332ffff388 + - 85910466-876b-4fc7-9dd1-c9baa7f7870a --- Turn an array into an HTML ordered list element. +:::hot tip +`ol` accepts colon delimited key:value pairs to pass HTML attributes to the `
    ` element; you cannot pass attributes to individual `
  1. ` elements. + +```antlers +{{ food | ol('class:dessert', 'disabled:') }} +``` +::: + ```yaml food: - sushi @@ -33,4 +44,4 @@ food:
  2. broccoli
  3. kale
-``` +``` \ No newline at end of file diff --git a/content/collections/modifiers/ul.md b/content/collections/modifiers/ul.md index e36c109fc..08d563f3a 100644 --- a/content/collections/modifiers/ul.md +++ b/content/collections/modifiers/ul.md @@ -5,9 +5,20 @@ modifier_types: - array - markup title: UL +related_entries: + - fbdb7bf5-ac19-444c-9536-57332ffff388 + - 327f4a3b-04d4-4069-881a-fe50ddb9be23 --- Turn an array into an HTML unordered list element. +:::hot tip +`ul` accepts colon delimited key:value pairs to pass HTML attributes to the ` -``` +``` \ No newline at end of file