You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/channels/entries.md
+31-27Lines changed: 31 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -277,7 +277,7 @@ You can hard code the channel tag to show a specific channel entry. You may also
277
277
278
278
entry_id="13|42|147"
279
279
280
-
Or use "not" to exclude entries::
280
+
Or use "not" to exclude entries:
281
281
282
282
entry_id="not 45|534|807"
283
283
@@ -311,15 +311,15 @@ NOTE: **Note:** Using this parameter will automatically constrain the entries ta
311
311
312
312
### `group_id=`
313
313
314
-
NOTE: We recommend using [primary_role_id=](#primary_role_id) parameter instead, which works the same but more clearly conveys that the filtering is happening on primary role ID.
314
+
NOTE: We recommend using the [primary_role_id=](#primary_role_id) parameter instead, which works the same but more clearly conveys that the filtering is happening on primary role ID.
315
315
316
316
group_id="4"
317
317
318
318
You can decide from which Member Role (by specifying the role ID) you wish entries to be shown. If you choose "4", then only entries created by members of the Primary Role with the ID of 4 will be shown. You can choose multiple Roles using a pipe:
319
319
320
320
group_id="2|3|4"
321
321
322
-
Or exclude role using "not"
322
+
Or exclude roles using "not"
323
323
324
324
group_id="not 2|3|4"
325
325
@@ -368,10 +368,14 @@ The `orderby` parameter sets the display order of the entries. Setting options f
368
368
-`orderby="view_count_three"`
369
369
-`orderby="view_count_four"`
370
370
371
-
In addition you can order by a [channel field](control-panel/field-manager/field-manager-settings.md). Use the "short_name" of the field:
371
+
In addition, you can order by a [channel field](control-panel/field-manager/field-manager-settings.md). Use the "short_name" of the field:
372
372
373
373
orderby="name_of_field"
374
374
375
+
You can also order results by file names:
376
+
377
+
orderby="file_field:filename"
378
+
375
379
NOTE: **Note:** Ordering by a Relationship field will cause entries to appear in the order the relationships were made, not based on any content from the related entries.
376
380
377
381
NOTE: **Note:****Random** ordered entries have special rules applied. "Sticky" entries will not appear first; they will appear randomly with all other entries. If the tag is not paginated, each page load, a new selection of random entries will be returned. If the tag **is** paginated, then the order of the entries is randomly set on the first page load and stored for the user's session so that entries show up only once in the paginated results.
@@ -398,17 +402,17 @@ Will result in:
398
402
399
403
Default Site - Entry One - Albert
400
404
Default Site - Entry Two - Bobby
401
-
Second Site - Entry One - Alligator
402
-
Second Site - Entry Two - Buffalo
405
+
Second Site - Entry One - Alligator
406
+
Second Site - Entry Two - Buffalo
403
407
404
408
If you have multiple Sites where each site has a field with the same exact short name, then you can specify that short name (without the site specified) and ExpressionEngine will treat those two fields as the same value and be able to order them as if they were the same field:
405
409
406
410
orderby="body"
407
411
408
412
Default Site - Entry One - Albert
409
-
Second Site - Entry One - Alligator
413
+
Second Site - Entry One - Alligator
410
414
Default Site - Entry Two - Bobby
411
-
Second Site - Entry Two - Buffalo
415
+
Second Site - Entry Two - Buffalo
412
416
413
417
Thus, the output will then be ordered by the body, regardless of the originating site.
414
418
@@ -570,7 +574,7 @@ This example would return all results where the body field is empty.
570
574
571
575
search:body="not IS_EMPTY"
572
576
573
-
This example would return all results where the body field is **not** empty, i.e. only entries where the body field had content.
577
+
This example would return all results where the body field is **not** empty, i.e., only entries where the body field had content.
574
578
575
579
The IS_EMPTY search constant can also be used in conjunction with other search terms, for both "Exact" and "Contains" type matching.
576
580
@@ -590,13 +594,13 @@ NOTE: **Note:** You may use multiple search: parameters in a channel entries tag
When using multiple search parameters, all search parameters must be matched in order for an entry to be included. The above example would pull back only those entries where the style is 'ale', the region is 'germany' or 'belgium' and the rating is 1, 2 or 3.
597
+
When using multiple search parameters, all search parameters must be matched in order for an entry to be included. The above example would pull back only those entries where the style is 'ale', the region is 'germany' or 'belgium', and the rating is 3, 4, or 5.
594
598
595
599
### `show_current_week=`
596
600
597
601
show_current_week="yes"
598
602
599
-
Requires use of the [display_by=](#display_by) "week" parameter. When set to "yes", it displays the current week by default (i.e. no pagination in the URL) and automatically adjusts the pagination links to indicate the correct page for that week.
603
+
Requires use of the [display_by=](#display_by) "week" parameter. When set to "yes", it displays the current week by default (i.e., no pagination in the URL) and automatically adjusts the pagination links to indicate the correct page for that week.
600
604
601
605
### `show_expired=`
602
606
@@ -739,15 +743,15 @@ This parameter limits the query by username. You can use the pipe character to q
739
743
740
744
username="tom|dick|harry"
741
745
742
-
Or you can add "not" to exclude usernames
746
+
Or you can add "not" to exclude usernames:
743
747
744
748
username="not tom|dick|harry|fred"
745
749
746
750
You can also use the token `"CURRENT_USER"` to show entries from only the currently logged in user.
747
751
748
752
username="CURRENT_USER"
749
753
750
-
This allow each logged-in user to get only their entries. Users who are not logged in won't see anything. Alternatively, you can use the token `"NOT_CURRENT_USER"` to show entries **except** from the currently loggedin user.
754
+
This allows each logged-in user to get only their entries. Users who are not logged in won't see anything. Alternatively, you can use the token `"NOT_CURRENT_USER"` to show entries **except** from the currently logged-in user.
751
755
752
756
username="NOT_CURRENT_USER"
753
757
@@ -791,7 +795,7 @@ If five entries are being displayed per page, then for the fourth entry on the s
791
795
792
796
### `{absolute_index}`
793
797
794
-
Similar to `absolute_count` but starts at 0 instead of 1. So the first entry will have value of "0" and the second entry will have a value of "1" etc.
798
+
Similar to `absolute_count` but starts at 0 instead of 1. So the first entry will have a value of "0" and the second entry will have a value of "1", etc.
795
799
796
800
### `{absolute_results}`
797
801
@@ -839,7 +843,7 @@ The name of the channel that the currently displayed entry is assigned to.
839
843
840
844
### `{channel_id}`
841
845
842
-
The ID number of the actual channel (not the _entry_.)
846
+
The ID number of the actual channel (not the _entry_).
843
847
844
848
### `{channel_short_name}`
845
849
@@ -969,7 +973,7 @@ The date on which the entry was last edited in GMT. This variable is **not** loc
969
973
970
974
### `{index}`
971
975
972
-
Similar to `count` but starts at 0 instead of 1. So the first entry will have value of "0" and the second entry will have a value of "1" etc.
976
+
Similar to `count` but starts at 0 instead of 1. So the first entry will have a value of "0" and the second entry will have a value of "1", etc.
973
977
974
978
### `{ip_address}`
975
979
@@ -985,13 +989,13 @@ This variable is replaced by a URL that passes the author's member name to your
985
989
986
990
### `{page_uri}`
987
991
988
-
If you have the Pages Module installed and if you have associated a static page with a channel entry (via the "Pages" section of the Publish tab), this is the page uri for the page. It will typically be used like so:
992
+
If you have the Pages Module installed and if you have associated a static page with a channel entry (via the "Pages" section of the Publish tab), this is the page URI for the page. It will typically be used like so:
989
993
990
994
{if page_uri != ''} <a href="{page_uri}">View this page</a> {/if}
991
995
992
996
### `{page_url}`
993
997
994
-
If you have the Pages Module installed and if you have associated a static page with a channel entry (via the "Pages" section of the Publish tab), this is the page url for the page (the site URL + the page URI). It will typically be used like so:
998
+
If you have the Pages Module installed and if you have associated a static page with a channel entry (via the "Pages" section of the Publish tab), this is the page URL for the page (the site URL + the page URI). It will typically be used like so:
995
999
996
1000
{if page_url != ''} <a href="{page_url}">View this page</a> {/if}
997
1001
@@ -1071,7 +1075,7 @@ The width of the signature image associated with the entry's author. Typically u
1071
1075
1072
1076
### `{status}`
1073
1077
1074
-
The status of the entry (open, closed, etc.)
1078
+
The status of the entry (open, closed, etc.).
1075
1079
1076
1080
### `{switch}`
1077
1081
@@ -1156,19 +1160,19 @@ Conditionals allow you to more precisely control your content.
1156
1160
1157
1161
NOTE: **Note:** A more complete explanation of conditional control structures and operators can be found on the [Conditional Tags](templates/conditionals.md) page.
1158
1162
1159
-
Here is an example that tests for the "summary" field being not empty
1163
+
Here is an example that tests for the "summary" field being not empty:
1160
1164
1161
1165
{if summary != ""}
1162
1166
The summary is not empty!
1163
1167
{/if}
1164
1168
1165
-
An alternate, shorthand syntax can accomplish the same thing
1169
+
An alternate, shorthand syntax can accomplish the same thing:
1166
1170
1167
1171
{if summary}
1168
1172
The summary is not empty!
1169
1173
{/if}
1170
1174
1171
-
If only the variable name is in the conditional statement it tests for "not empty".
1175
+
If only the variable name is in the conditional statement, it tests for "not empty".
1172
1176
1173
1177
Many of the single variables can be used in a conditional. You may always use the short name of one of your custom entry fields in a conditional. In addition, there are several unique conditionals.
1174
1178
@@ -1250,7 +1254,7 @@ Lastly, if you want to simply display your 404 page (with 404 headers) when no e
1250
1254
1251
1255
NOTE: **Note:** If you have several nested tags, each one would need to include a `{if no_results}` pair to be parsed correctly.
1252
1256
1253
-
For instance, if you have Grid field with `{if no_results}` block, the parent `{exp:channel:entries}` tag pair would need to include `{if no_results}` block as well.
1257
+
For instance, if you have a Grid field with an `{if no_results}` block, the parent `{exp:channel:entries}` tag pair would need to include an `{if no_results}` block as well:
1254
1258
```
1255
1259
{exp:channel:entries channel="blog"}
1256
1260
{if no_results} No entries {/if}
@@ -1297,13 +1301,13 @@ You may test whether an entry is set to be "sticky". You may also test whether i
1297
1301
1298
1302
[TOC=3]
1299
1303
1300
-
Variable pairs contain an opening and closing tag as well as content in-between. Example:
1304
+
Variable pairs contain an opening and closing tag as well as content inbetween. Example:
The reason variable pairs have an opening and closing pair is because the information between the pairs can be shown or not shown if the criteria for each tag is met.
1305
1309
1306
-
In the case of the "date_heading" pair, for example, it only appears at a certain interval that you set (hourly, daily, weekly, monthly, etc.). By using a pair of variables you can put HTML formatting between them that only gets shown when the interval is met. Otherwise, the chunk is not displayed.
1310
+
In the case of the "date_heading" pair, for example, it only appears at a certain interval that you set (hourly, daily, weekly, monthly, etc.). By using a pair of variables, you can put HTML formatting between them that only gets shown when the interval is met. Otherwise, the chunk is not displayed.
1307
1311
1308
1312
### `{date_footer}`
1309
1313
@@ -1462,9 +1466,9 @@ The category ID associated with the category's parent (or 0 in the case of a top
1462
1466
1463
1467
{path='channel/index'}
1464
1468
1465
-
This variable will be replaced by a URL to the specifies Template Group/Template. The category designation information will automatically be added to the end of the URL so that the target page will know which category to display.
1469
+
This variable will be replaced by a URL to the specified Template Group/Template. The category designation information will automatically be added to the end of the URL so that the target page will know which category to display.
1466
1470
1467
-
If you want the category links to point to your site index instead of a particular template group/template you can use SITE_INDEX instead:
1471
+
If you want the category links to point to your site index instead of a particular template group/template, you can use SITE_INDEX instead:
0 commit comments