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/comment/entries.md
+24-20Lines changed: 24 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Here is a basic example showing how you might use the comment tag:
22
22
<p>By {name} on {comment_date format="%Y %m %d"}</p>
23
23
{/exp:comment:entries}
24
24
25
-
NOTE: **Important:** The Comment Entries tag should **not** be nested inside of a standard {exp:channel:entries} tag.
25
+
NOTE: **Important:** The Comment Entries tag should **not** be nested inside of a standard {exp:channel:entries} tag. If you do, the outer tag will parse and resolve many of these variables and conditionals before the Comment Entries tag has the chance to do so.
26
26
27
27
## Parameters
28
28
@@ -158,12 +158,6 @@ This variable will always display the absolute total number of results that are
158
158
159
159
The _opposite_ of `{absolute_count}`, in that it displays the entry count position counting backwards from the absolute total. Works across pagination, so the fifth entry in a list of fifteen entries would display "10".
160
160
161
-
### `{allow_comments}`
162
-
163
-
{if allow_comments}
164
-
165
-
TRUE / FALSE, Whether or not the entry being displayed allows comments. Typically used as a conditional.
166
-
167
161
### `{author}`
168
162
169
163
The comment author's screen name, if a member; otherwise, this variable will display the name submitted with the comment.
@@ -196,10 +190,6 @@ The URL to the avatar image associated with the entry's author. Typically used a
TRUE / FALSE, Whether a member has permission to edit a given comment AND/OR close that comment. Used in conjunction with [comment editing](comment/form.md#allowing-members-to-edit-comments-on-the-front-end).
202
-
203
193
### `{channel_id}`
204
194
205
195
The ID number of the channel that the comment belongs to.
@@ -289,12 +279,6 @@ If five entries are being displayed per page, then for the fourth entry on the p
289
279
290
280
The date on which the comment was edited. See [Date Variable Formatting](templates/date-variable-formatting.md) for more information.
291
281
292
-
### `{editable}`
293
-
294
-
{if editable}Show Edit{/if}
295
-
296
-
This variable will be used in a conditional to allow [comment editing](comment/form.md#allowing-members-to-edit-comments-on-the-front-end). It indicates whether a member has [permission to edit a given comment](control-panel/member-manager.md#createedit-all-member-roles).
297
-
298
282
### `{email}`
299
283
300
284
The comment author's email address, if specified.
@@ -453,7 +437,15 @@ These are totally dynamic in that any profile field you create for your members
453
437
454
438
[TOC=3]
455
439
456
-
The following special conditionals are available:
440
+
The following special conditionals are available.
441
+
442
+
NOTE: **Important:** Avoid using Template Caching on any Template containing these conditional that are user-specific. If you do not avoid caching, then data will not be dynamic for each user. Instead, whoever happens to load the page when it gets cached will have their conditionals applied to every subsequent visitor until the cache expires.
443
+
444
+
### `{if allow_comments}`
445
+
446
+
{if allow_comments} content {/if}
447
+
448
+
TRUE / FALSE, Whether or not the entry being displayed allows comments. Typically used as a conditional.
457
449
458
450
### `{if avatar}`
459
451
@@ -463,20 +455,32 @@ This special conditional lets you conditionally display content if the current e
TRUE / FALSE, Whether a member has permission to edit a given comment AND/OR close that comment. Used in conjunction with [comment editing](comment/form.md#allowing-members-to-edit-comments-on-the-front-end).
461
+
466
462
### `{if comments_expired}`
467
463
464
+
{if comments_expired} content {/if}
465
+
468
466
If commenting has expired (and expiration is not set to be [overridden by moderation](comment/control-panel.md)), the contents of this conditional will be displayed.
469
467
470
468
NOTE: **Note:**`{if no_results}` has precedence over this conditional. If there are no comments, this conditional is not evaluated.
471
469
472
470
### `{if comments_disabled}`
473
471
474
-
{if comments_disabled}
472
+
{if comments_disabled} content {/if}
475
473
476
474
If commenting has been disabled, the contents of this conditional will be displayed.
477
475
478
476
NOTE: **Note:**`{if no_results}` has precedence over this conditional. If there are no comments, this conditional is not evaluated.
479
477
478
+
### `{if editable}`
479
+
480
+
{if editable} Show Edit Form {/if}
481
+
482
+
TRUE / FALSE, This variable will be used in a conditional to allow [comment editing](comment/form.md#allowing-members-to-edit-comments-on-the-front-end). It indicates whether a member has [permission to edit a given comment](control-panel/member-manager.md#createedit-all-member-roles).
483
+
480
484
### `{if is_ignored}`
481
485
482
486
{if is_ignored} content {/if}
@@ -509,7 +513,7 @@ Or you can use Javascript to allow the user to read the comment if they wish:
NOTE: **Important:** Avoid using Template Caching on any Template containing this conditional. If you do not avoid caching, then data will not be dynamic for each user. Instead, whoever happens to load the page when it is cached will have their ignore list applied to everyone until the cache expires.
516
+
NOTE: **Important:** Avoid using Template Caching on any Template containing this conditional. If you cache this, whoever happens to load the page when it is first cached will have their ignore list applied to everyone until the cache is cleared.
0 commit comments