Skip to content

Commit d64198c

Browse files
author
Andy McCormick
committed
copying updates from 6 to 7 docs
1 parent 3338bea commit d64198c

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

docs/channels/categories.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,20 @@ These are totally dynamic in that any field you create for your category will au
272272

273273
You may use this conditional to test whether the category shown is the active category or not, based on the dynamic URI segment.
274274

275+
### `{has_children}`
276+
277+
{exp:channel:categories channel="news" style="nested" show_empty="no"}
278+
<a href="{path='channel/index'}">{category_name}</a>
279+
280+
{if has_children}
281+
<button
282+
type="button"
283+
aria-haspopup="true"
284+
>children categories</button>
285+
{/if}
286+
{/exp:channel:categories}
287+
You may use this conditional to test whether the category shown is or isn't a parent category.
288+
275289
## Category Dropdown Menu
276290

277291
You can also display categories in a dropdown menu using the following code:

docs/channels/category-archive.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,20 @@ There are several variables available for use inside the `{categories}{/categori
249249

250250
You may use this conditional to test whether the category shown is the active category or not, based on the dynamic URI segment.
251251

252+
### `{has_children}`
253+
254+
{categories}
255+
<a href="{path='channel/index'}">{category_name}</a>
256+
257+
{if has_children}
258+
<button
259+
type="button"
260+
aria-haspopup="true"
261+
>children categories</button>
262+
{/if}
263+
{/categories}
264+
You may use this conditional to test whether the category shown is or isn't a parent category.
265+
252266
### `{category_description}`
253267

254268
{categories}

docs/fieldtypes/url.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Which URL Schemes the content author is allowed to use in this URL field. Availa
2323

2424
- `http://`
2525
- `https://`
26+
- `/` ([single slash protocol-relative URLs](https://en.wikipedia.org/wiki/Wikipedia:Protocol-relative_URL))
2627
- `//` ([protocol-relative URLs](https://en.wikipedia.org/wiki/Wikipedia:Protocol-relative_URL))
2728
- `mailto:`
2829
- `ftp://`

0 commit comments

Comments
 (0)