Skip to content

Commit 7748d8f

Browse files
authored
Update file.md
Added example of conditional.
1 parent c5be66b commit 7748d8f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/fieldtypes/file.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ If you have defined any [image manipulations](control-panel/file-manager/upload-
5858

5959
{news_image:small}
6060

61+
### Conditional Content Check
62+
63+
If you want to see if there is a file selected, the easiest method is to check for the file URL:
64+
65+
{if news_image == ""}There is no news image selected.{/if}
66+
67+
or even
68+
69+
{if news_image}File URL: {news_image}{/if}
70+
6171
### Wrap Parameter
6272

6373
You will frequently want to link to the file in your entry. Using the wrap parameter can simplify this process:

0 commit comments

Comments
 (0)