Skip to content

Commit f48e352

Browse files
committed
Merge branch 'master' into self-hosted
2 parents f9301ff + 87d980f commit f48e352

File tree

8 files changed

+40
-57
lines changed

8 files changed

+40
-57
lines changed

_includes/ads-article.html

Lines changed: 0 additions & 8 deletions
This file was deleted.

_includes/ads-homepage.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{% seo title=false %}
1515
</head>
1616

17-
<body itemscope itemtype="https://schema.org/WebPage">
17+
<body itemscope itemtype="https://schema.org/WebPage" class="homepage">
1818

1919
{% include header.html %}
2020

index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Documentation for Textpattern’s out-of-the-box functionality. [Editorial contr
1515
<div class="layout-container index-docs">
1616
<section class="layout-3col">
1717

18-
### Installation handling
18+
## Installation handling
1919
{: .index-docs-start}
2020

2121
* [Installing the software](/setup/installing-the-software)
@@ -30,7 +30,7 @@ Documentation for Textpattern’s out-of-the-box functionality. [Editorial contr
3030
</section>
3131
<section class="layout-3col">
3232

33-
### Site administration
33+
## Site administration
3434
{: .index-docs-admin}
3535

3636
* [Textpattern administration](/administration/) (explanations of principle functionality)
@@ -41,7 +41,7 @@ Documentation for Textpattern’s out-of-the-box functionality. [Editorial contr
4141
</section>
4242
<section class="layout-3col">
4343

44-
### Tags
44+
## Tags
4545
{: .index-docs-tags}
4646

4747
<section>
@@ -66,7 +66,7 @@ Documentation for Textpattern’s out-of-the-box functionality. [Editorial contr
6666
</section>
6767
<section class="layout-3col">
6868

69-
### Themes
69+
## Themes
7070
{: .index-docs-theme}
7171

7272
* [Themes: Creating, using, and sharing](/build/themes-creating-using-and-sharing)
@@ -77,7 +77,7 @@ Documentation for Textpattern’s out-of-the-box functionality. [Editorial contr
7777
</section>
7878
<section class="layout-3col">
7979

80-
### Development
80+
## Development
8181
{: .index-docs-dev}
8282

8383
* [Plugin development](/development/)
@@ -88,7 +88,7 @@ Documentation for Textpattern’s out-of-the-box functionality. [Editorial contr
8888
</section>
8989
<section class="layout-3col">
9090

91-
### Tutorials and FAQs
91+
## Tutorials and FAQs
9292
{: .index-docs-faqs}
9393

9494
* [Textpattern basic tutorial](/faqs/textpattern-basic-tutorial)

index2.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ Everything you need to use Textpattern out-of-the-box and make website managemen
1515
<div class="layout-container index-docs">
1616
<section class="layout-3col">
1717

18-
### Setup and Configuration
18+
## Setup and Configuration
1919
{: .index-docs-admin}
2020

2121
{% include index-lists-setup.html %}
2222

2323
</section>
2424
<section class="layout-3col">
2525

26-
### Construction and Presentation
26+
## Construction and Presentation
2727
{: .index-docs-start}
2828

2929
{% include index-lists-build.html %}
3030

3131
</section>
3232
<section class="layout-3col">
3333

34-
### Tags and Attributes
34+
## Tags and Attributes
3535
{: .index-docs-tags}
3636

3737
{% include index-lists-tags.html %}

tags/search_input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ When using a customized form template, Textpattern doesn't automatically wrap th
8686

8787
Other tags used: [site_url](/tags/site_url).
8888

89-
Note: When displaying search results, Textpattern will use a user defined form named `search_results`, or an internally defined default form if no search result form is nominated/defined.
89+
Note: When displaying search results, Textpattern will use the form named `search_results`, unless another form is nominated/defined via the `form` attribute or the tag's container.
9090
{: .alert-block .information}
9191

9292
### Example 3: Minimal search input form without label or button (yet still accessible)

tags/search_result_count.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ tags:
2121
<txp:search_result_count />
2222
~~~
2323

24-
The **search_result_count** tag is a *single* tag that returns the number of articles returned by an article tag. Use [if_search](/tags/if_search) to count search results or use in regular page after the [article](/tags/article) tag. If you need the results' count *before* the list of results, use the article tag in conjunction with `pgonly="1"` (see example 3).
24+
The **search_result_count** tag is a *single* tag that returns the number of (live) articles returned by an article tag.
2525

26-
Note: The [if_search](/tags/if_search) conditional tag is required to recognize actual search results, without them the number of articles is returned by default.
27-
{: .alert-block .information}
26+
* Wrap with [if_search](/tags/if_search) tags to count search results.
27+
* Use in a regular article list page by wrapping with [if_article_list](/tags/if_article_list) to count articles in that section.
28+
* Use on the front (default) page to count the number of articles in sections with __On default page__ set to Yes.
2829

2930
## Attributes
3031

@@ -36,44 +37,48 @@ Tag will accept the following attributes (**case-sensitive**) as well as the {%
3637

3738
## Examples
3839

39-
### Example 1: Display a number of matches
40+
### Example 1: Display number of search matches or articles in current section
4041

4142
~~~ html
4243
<txp:if_search>
43-
<txp:article />
4444
<txp:search_result_count />
45+
<txp:else />
46+
<txp:if_article_list>
47+
<txp:search_result_count text="articles" />
48+
</txp:if_article_list>
4549
</txp:if_search>
50+
51+
<txp:article />
4652
~~~
4753

48-
If the visitor is searching for articles, it will show the number of articles that matched the search term (e.g. 5) as follows: `5 articles found`.
54+
If the visitor is searching for articles, it will show the number of articles that matched the search term (e.g. 5) as follows: `5 articles found`. Otherwise, if Textpattern is displaying an article list, it will display the number of articles like this: `42 articles`.
4955

50-
Other tags used: [article](/tags/article), [if_search](/tags/if_search).
56+
Note: The [if_search](/tags/if_search) conditional tag is required to recognize actual search results. Without it, the number of articles is returned by default.
57+
{: .alert-block .information}
5158

52-
### Example 2: Number of matches with custom text
59+
Other tags used: [article](/tags/article), [if_search](/tags/if_search), [if_article_list](/tags/if_article_list).
60+
61+
### Example 2: Number of matches, using custom text
5362

5463
~~~ html
55-
<txp:if_search>
64+
<txp:if_search_results>
5665
<txp:search_result_count text="hits" />
57-
</txp:if_search />
66+
</txp:if_search_results />
5867
~~~
5968

6069
Displays the number of articles returned (e.g. 5) as follows: `5 hits`.
6170

62-
Other tags used: [if_search](/tags/if_search).
71+
Other tags used: [if_search_results](/tags/if_search_results).
6372

64-
### Example 3: Search result count above results
73+
### Example 3: Regular (live) article count
6574

6675
~~~ html
67-
<txp:if_search>
68-
<txp:article pgonly="1" limit="20" />
69-
<txp:search_result_count text="hits" />
76+
<txp:if_article_list>
77+
<txp:search_result_count text="articles" />
7078
<txp:article limit="20" />
71-
</txp:if_search />
79+
</txp:if_article_list />
7280
~~~
7381

74-
Displays the number of articles returned (e.g. 5) as follows: `5 hits` - then displays results as an article listing.
75-
76-
Note: The `pgonly` attribute sets the article tag to return pagination statistics without rendering the article list. Care must be taken to remain consistent with article tag attributes to keep statistics accurate.
77-
{: .alert-block .information}
82+
Displays the number of articles in the current section, then displays them as an article listing, 20 per page.
7883

79-
Other tags used: [article](/tags/article), [if_search](/tags/if_search).
84+
Other tags used: [article](/tags/article), [if_article_list](/tags/if_article_list).

tags/search_result_title.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@ This tag has no attributes of its own. It accepts only the {% include atts-globa
3232
### Example 1: Display a hyperlinked title to an article
3333

3434
~~~ html
35-
<h3>
36-
<txp:search_result_title />
37-
<txp:search_result_date />
38-
</h3>
35+
<txp:search_result_title wraptag="h3" />
36+
<txp:posted wraptag="p" class="date" />
3937
~~~
4038

4139
In a search results form, this shows the title of an article that matched the visitor's search results, and its posted date.
4240

43-
Other tags used: [search_result_date](/tags/search_result_date).
41+
Other tags used: [posted](/tags/posted).

0 commit comments

Comments
 (0)