Skip to content

Commit 845275d

Browse files
authored
Update notes on preview templates and conditions
Clarified note on preview templates and added usage of is_live_preview_request conditional.
1 parent cfc7c73 commit 845275d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/control-panel/create.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ The template used to display the preview is based on configured Pages/Structure
198198

199199
If neither of these is set, the preview button will have an exclamation mark (!) and it will link to channel preferences page where Preview URL can be set.
200200

201-
You will usually want this preview template to be the same template as the live page uses, but in certain cases you may want to use a customized, admin-only preview template.
201+
NOTE: **Note:** Commonly, the channel preview template is set to be the same template that the live entry, but in certain cases it's useful to use a different, customized preview template. Pages/Structure do not have this flexibility.
202+
203+
NOTE: **Note:** Use the [`{is_live_preview_request}`](globals/single-variables.md#is_live_preview_request) conditional to only display certain content or to modify certain attributes only when previewing an entry. For example, `{if is_live_preview_request}status="open|closed" show_future_entries="yes"{/if}` will preview an entry that is closed or set to publish in the future.
202204

203205
Once the preview is triggered, it will continue to be displayed side-by-side with edit screen until you close it. The size of preview window can be adjusted with the mouse by dragging its border. The preview contents will dynamically update as you change the contents of any field.
204206

0 commit comments

Comments
 (0)