Skip to content

Commit 41c2bae

Browse files
committed
Update popup tag
1 parent 8628aa2 commit 41c2bae

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

tags/popup.md

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: document
33
category: Tags
44
published: true
55
title: Popup
6-
description: Textpattern will replace this tag with a popup selector for browsing by section or category.
6+
description: Textpattern will replace this tag with a selector for browsing by section or category.
77
tags:
88
- Navigation tags
99
---
@@ -21,53 +21,43 @@ tags:
2121
<txp:popup />
2222
~~~
2323

24-
The **popup** tag is a *single* tag. Textpattern will replace this tag with a popup selector for browsing by section or category.
24+
The **popup** tag is a *single* tag. Textpattern will replace this tag with a select list for browsing by section or category, wrapped in an HTML `<form>`. Selecting an entry will automatically submit the form unless scripting is disabled, in which case a 'submit' button will be displayed too.
2525

2626
## Attributes
2727

2828
Tag will accept the following attributes (**case-sensitive**) as well as the {% include atts-global-link.html %}:
2929

3030
`section="section_name"`
31-
: Jump to the selected category for the named section.
31+
: Filter the selected category by the named section, instead of listing all articles that match the category. Only of use if `type="category"`.
3232
: **Default:** unset.
3333

3434
`this_section="boolean"`
35-
: Jump to the selected category for the currently active section.
35+
: Filter the selected category by the currently active section, instead of listing all articles that match the category. Only of use if `type="category"`.
3636
: **Values:** `0` (no) or `1` (yes).
3737
: **Default:** `0`.
3838

3939
`type="type"`
4040
: **Values:** `section`, `category`.
4141
: **Default:** `category`.
4242

43-
### Common presentational attributes
44-
45-
These attributes, which affect presentation, are shared by many tags. Note that default values can vary among tags.
46-
47-
`class="class name"` <span class="footnote warning">v4.3.0+</span>
48-
: HTML `class` to apply to the `wraptag` attribute value.
49-
: **Default:** tag name or unset (see [class cross-reference](/tags/tag-attributes-cross-reference#class)).
50-
51-
`label="text"`
52-
: Label prepended to item.
53-
: **Default:** unset (but see [label cross-reference](/tags/tag-attributes-cross-reference#label) for exceptions).
54-
55-
`wraptag="element"`
56-
: HTML element to wrap (markup) list block, specified without brackets (e.g. `wraptag="ul"`).
57-
: **Default:** unset (but see [wraptag cross-reference](/tags/tag-attributes-cross-reference#wraptag) for exceptions).
58-
5943
## Examples
6044

6145
### Example 1: Browse by category popup selector
6246

6347
~~~ html
64-
<txp:popup type="category" wraptag="p" />
48+
<txp:popup type="category" wraptag="div" />
49+
~~~
50+
51+
### Example 2: Browse by section popup selector
52+
53+
~~~ html
54+
<txp:popup type="section" wraptag="div" class="site_browse" />
6555
~~~
6656

67-
### Example 2: Popup selector with custom label
57+
### Example 3: Popup selector with custom label that filters by current section
6858

6959
~~~ html
70-
<txp:popup label="Browse this site" type="category" wraptag="p" />
60+
<txp:popup label="Browse by category" type="category" this_section />
7161
~~~
7262

7363
## Genealogy

0 commit comments

Comments
 (0)