Skip to content

Commit 66f6f73

Browse files
committed
Merge branch 'master' into self-hosted
2 parents 910f0f6 + c7ab8bf commit 66f6f73

File tree

6 files changed

+62
-31
lines changed

6 files changed

+62
-31
lines changed

_includes/atts-global.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ <h3 id="common-global-attributes">Common global attributes</h3>
44
<p>These attributes are shared by all tags - and plugins, provided they do not override the functionality.</p>
55
{% endif %}
66
<dl>
7-
<dt><code>break="value"</code></dt>
8-
<dd>Where value is an HTML element, specified without brackets (e.g. <code>break="li"</code>) or some string to separate list items.</dd>
9-
<dd><strong>Default:</strong> {% if include.break == null %}br{% else %}{{ include.break }}{% endif %} (see <a href="/tags/tag-attributes-cross-reference#break">break cross-reference</a>).</dd>
10-
7+
{% unless include.break == "" %}
8+
<dt><code>break="value"</code></dt>
9+
<dd>Where value is an HTML element, specified without brackets (e.g. <code>break="li"</code>) or some string to separate list items.</dd>
10+
<dd><strong>Default:</strong> {% if include.break == null %}br{% else %}{{ include.break }}{% endif %} (see <a href="/tags/tag-attributes-cross-reference#break">break cross-reference</a>).</dd>
11+
{% endunless %}
12+
1113
<dt><code>class="class name"</code></dt>
1214
<dd>HTML <code>class</code> to apply to the wrapper.</dd>
1315
<dd><strong>Values:</strong> Any valid string.</dd>

_includes/header.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta itemprop="accessibilityHazard" content="noSoundHazard">
66
<meta itemprop="accessibilityAPI" content="ARIA">
77
<a class="a--skip-link" href="#main">Go to main content</a>
8-
<div class="wrapper">
8+
<div id="dynamic-header">
99
<header class="site-header" itemscope itemtype="https://schema.org/Organization">
1010
<h1 class="masthead" itemprop="name"><a rel="home" itemprop="url" href="https://textpattern.com/" title="Go to the Textpattern homepage">Textpattern CMS</a></h1>
1111
<meta itemprop="logo" content="https://textpattern.com/assets/img/branding/textpattern/textpattern.png">
@@ -34,4 +34,6 @@ <h1 class="masthead" itemprop="name"><a rel="home" itemprop="url" href="https://
3434
</ul>
3535
</nav>
3636
</div>
37+
</div>
38+
<div class="wrapper">
3739
<main id="main" aria-label="Main content">

tags/category1.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: document
33
category: Tags
44
published: true
55
title: Category1
6-
description: The category1 tag will display information of the category as defined by 'Category 1' of the article being displayed.
6+
description: The category1 tag will display the category as defined by 'Category 1' in the article being displayed.
77
tags:
88
- Article tags
99
- Navigation tags
@@ -22,7 +22,7 @@ tags:
2222
<txp:category1 />
2323
~~~
2424

25-
The **category1** tag can be used as either a *single* tag or *container* tag. It will display information of the category as defined by **Category 1** of the article being displayed. When used as a containing tag, it will turn the contents into a link to that category. Otherwise, it will return plain text.
25+
The **category1** tag can be used as either a *single* tag or *container* tag. It will display the category as defined by **Category 1** in the article being displayed. When used as a container tag, it will turn the contents into a link to that category. Otherwise, it will return plain text.
2626

2727
This tag may be used within either an article form, or in a page, wrapped in an [if_individual_article](/tags/if_individual_article) conditional tag.
2828

@@ -50,17 +50,9 @@ Tag will accept the following attributes (**case-sensitive**):
5050
: **Values:** `0` (no, allow from any section) or `1` (yes).
5151
: **Default:** `0`.
5252

53-
### Common presentational attributes
53+
{% include atts-common.html breakby="" %}
5454

55-
These attributes, which affect presentation, are shared by many tags. Note that default values can vary among tags.
56-
57-
`class="class name"` <span class="footnote warning">v4.0.4+</span>
58-
: HTML `class attribute` to be applied to `wraptag`.
59-
: **Default:** unset (see [class cross-reference](/tags/tag-attributes-cross-reference#class)).
60-
61-
`wraptag="tag"` <span class="footnote warning">v4.0.4+</span>
62-
: HTML tag to wrap around output, specified without brackets (e.g. `wraptag="p"`).
63-
: **Default:** unset (but see [wraptag cross-reference](/tags/tag-attributes-cross-reference#wraptag) for exceptions).
55+
{% include atts-global.html %}
6456

6557
## Examples
6658

@@ -76,28 +68,36 @@ These attributes, which affect presentation, are shared by many tags. Note that
7668

7769
~~~ html
7870
<p>
79-
<txp:category1 link="1" title="1" />
71+
<txp:category1 link title />
8072
</p>
8173
~~~
8274

83-
If **category1** is 'General stuff', this tag will display the words 'General stuff' as a hyperlink to a list of articles in the same category.
75+
If **category1** is defined with a title 'Dogs', this tag will display the words 'Dogs' as a hyperlink to a list of articles in the same category.
76+
77+
### Example 3: Category link using custom container content
78+
79+
~~~ html
80+
<txp:category1 wraptag="p">Other articles in category:
81+
<txp:category1 title /></txp:category1>
82+
~~~
8483

85-
### Example 3: Container example
84+
Might display this HTML:
8685

8786
~~~ html
8887
<p>
89-
<txp:category1>Other articles in category:
90-
<txp:category1 title="1" /></txp:category1>
91-
</p>
88+
<a rel="tag" href="https://example.com/category/dogs/">
89+
Other articles in category: Dogs
90+
</a>
91+
<p>
9292
~~~
9393

9494
### Example 4: Category 1 and 2
9595

9696
~~~ html
9797
<p>
98-
Filed in: <txp:category1 link="1" title="1" />
98+
Filed in: <txp:category1 link title />
9999
<txp:if_article_category number="2">
100-
and <txp:category2 link="1" title="1" />
100+
and <txp:category2 link title />
101101
</txp:if_article_category>
102102
</p>
103103
~~~

tags/site_name.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ tags:
2121
<txp:site_name />
2222
~~~
2323

24-
The **site_name** tag is a *single* tag that returns the site's name as defined within the [Preferences panel](/administration/preferences-panel).
24+
The **site_name** tag is a *single* tag that returns the site's name as defined within the Preferences panel.
2525

2626
## Attributes
2727

28-
This tag has no attributes
28+
This tag has no attributes of its own.
29+
30+
{% include atts-global.html break="" %}
2931

3032
## Examples
3133

@@ -36,3 +38,22 @@ This tag has no attributes
3638
<txp:site_name />
3739
</h1>
3840
~~~
41+
42+
### Example 2: Using global attributes to wrap and label the tag
43+
44+
~~~ html
45+
<txp:site_name labeltag="h2" label="Welcome" wraptag="h3" class="heading" />
46+
~~~
47+
48+
Would render this HTML:
49+
50+
~~~ html
51+
<h2>Welcome</h2>
52+
<h3 class="heading">My site</h3>
53+
~~~
54+
55+
## Genealogy
56+
57+
### Version 4.0.6
58+
59+
Tag renamed from `<txp:sitename />` to `<txp:site_name />`.

tags/site_slogan.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ tags:
2121
<txp:site_slogan />
2222
~~~
2323

24-
The **site_slogan** is a *single* tag which is used to output the site's tagline (labeled as 'Site slogan' in the [Preferences panel](/administration/preferences-panel)).
24+
The **site_slogan** is a *single* tag which is used to output the site's tagline (labeled as 'Site slogan' in the Preferences panel).
2525

26-
The slogan is a brief (255 characters maximum) tagline or description of your site which can be used, for example, in XML feeds.
26+
The slogan is a brief (255 characters maximum) tagline or description of your site which can be used, for example, in XML feeds or site browser headers.
2727

2828
## Attributes
2929

30-
This tag has no attributes.
30+
This tag has no attributes of its own.
31+
32+
{% include atts-global.html break="" %}
3133

3234
## Examples
3335

tags/site_url.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ tags:
2121
<txp:site_url />
2222
~~~
2323

24-
The **site_url** tag is a *single* tag which returns the full URL of the site (as defined in the [Preferences panel](/administration/preferences-panel)) as text. If you maintain local development versions of your live sites and import databases between them, then this tag is extremely valuable for ensuring your domain links are never confused (and thus broken) between the two locations (see example 1, below).
24+
The **site_url** tag is a *single* tag which returns the full URL of the site (as defined in the Preferences panel) as text. If you maintain local development versions of your live sites and import databases between them, then this tag is extremely valuable for ensuring your domain links are never confused (and thus broken) between the two locations (see example 1, below).
25+
26+
For more general purpose access to URLs and their components, please see the [page_url](/tags/page_url) tag, which includes admin (back-end) site links for both regular and multi-site installations, theme links and paths, and URL parameters.
2527

2628
## Attributes
2729

@@ -31,6 +33,8 @@ Tag will accept the following attribute (**case-sensitive**):
3133
: Specify this if you wish to return the URL to the admin-side instead of the public site.
3234
: **Default:** unset.
3335

36+
{% include atts-global.html break="" %}
37+
3438
## Examples
3539

3640
### Example 1: Maintain accurate domain paths

0 commit comments

Comments
 (0)