Skip to content
This repository was archived by the owner on Apr 21, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
245 commits
Select commit Hold shift + click to select a range
553d7aa
New translations user-profile-form.md (French)
angrybrad Jun 13, 2020
884eb73
New translations user-profile-form.md (Japanese)
angrybrad Jun 13, 2020
28d9288
New translations eager-loading-elements.md (French)
angrybrad Jun 13, 2020
4ebfe7c
New translations eager-loading-elements.md (Japanese)
angrybrad Jun 13, 2020
33fada3
New translations user-queries.md (Japanese)
angrybrad Jun 13, 2020
2832bcd
New translations user-queries.md (French)
angrybrad Jun 13, 2020
044067b
New translations app.md (Japanese)
angrybrad Jun 13, 2020
3c860f9
New translations app.md (French)
angrybrad Jun 13, 2020
5ea32d0
New translations config-settings.md (Japanese)
angrybrad Jun 13, 2020
f47b056
New translations db-settings.md (French)
angrybrad Jun 13, 2020
7163425
New translations db-settings.md (Japanese)
angrybrad Jun 13, 2020
bb8fb2a
New translations environments.md (French)
angrybrad Jun 13, 2020
35b56f8
New translations environments.md (Japanese)
angrybrad Jun 13, 2020
783dc4d
New translations php-constants.md (French)
angrybrad Jun 13, 2020
b521faf
New translations php-constants.md (Japanese)
angrybrad Jun 13, 2020
c8220db
New translations config-settings.md (French)
angrybrad Jun 13, 2020
2952a33
New translations asset-queries.md (French)
angrybrad Jun 13, 2020
28faece
New translations global-set-queries.md (Japanese)
angrybrad Jun 13, 2020
cec79a9
New translations asset-queries.md (Japanese)
angrybrad Jun 13, 2020
7f55d10
New translations tag-queries.md (Japanese)
angrybrad Jun 13, 2020
c1004f9
New translations matrix-block-queries.md (Japanese)
angrybrad Jun 13, 2020
ccc667c
New translations matrix-block-queries.md (French)
angrybrad Jun 13, 2020
1f754bc
New translations tag-queries.md (French)
angrybrad Jun 13, 2020
97c17de
New translations global-set-queries.md (French)
angrybrad Jun 13, 2020
e55a620
New translations entry-queries.md (Japanese)
angrybrad Jun 13, 2020
03cf9aa
New translations entry-queries.md (French)
angrybrad Jun 13, 2020
473124e
New translations category-queries.md (Japanese)
angrybrad Jun 13, 2020
89764a9
New translations category-queries.md (French)
angrybrad Jun 13, 2020
da0361f
New translations date-time-fields.md (French)
angrybrad Jun 13, 2020
b88d215
New translations date-time-fields.md (Japanese)
angrybrad Jun 13, 2020
afb76b5
New translations entries-fields.md (French)
angrybrad Jun 13, 2020
5df28a6
New translations globals.md (French)
angrybrad Jun 13, 2020
d4fc820
New translations entries-fields.md (Japanese)
angrybrad Jun 13, 2020
9ede617
New translations fields.md (French)
angrybrad Jun 13, 2020
4d6cbd1
New translations fields.md (Japanese)
angrybrad Jun 13, 2020
e6dcf89
New translations gc.md (French)
angrybrad Jun 13, 2020
254d795
New translations gc.md (Japanese)
angrybrad Jun 13, 2020
a043ab8
New translations globals.md (Japanese)
angrybrad Jun 13, 2020
bfce789
New translations graphql.md (French)
angrybrad Jun 13, 2020
7e1f988
New translations graphql.md (Japanese)
angrybrad Jun 13, 2020
9c41704
New translations image-transforms.md (French)
angrybrad Jun 13, 2020
b456ef3
New translations image-transforms.md (Japanese)
angrybrad Jun 13, 2020
5d6d8fe
New translations installation.md (French)
angrybrad Jun 13, 2020
3ebc6f8
New translations assets-fields.md (Japanese)
angrybrad Jun 13, 2020
52ed83a
New translations coc.md (Japanese)
angrybrad Jun 13, 2020
a7f712a
New translations README.md (Japanese)
angrybrad Jun 13, 2020
358be08
New translations lightswitch-fields.md (French)
angrybrad Jun 13, 2020
c91f092
New translations README.md (French)
angrybrad Jun 13, 2020
a932007
New translations README.md (Japanese)
angrybrad Jun 13, 2020
a6e6bea
New translations ci.md (French)
angrybrad Jun 13, 2020
785a0fd
New translations ci.md (Japanese)
angrybrad Jun 13, 2020
bb5e9ad
New translations testing.md (French)
angrybrad Jun 13, 2020
f5eee34
New translations testing.md (Japanese)
angrybrad Jun 13, 2020
099794a
New translations README.md (French)
angrybrad Jun 13, 2020
a1a61f8
New translations assets-fields.md (French)
angrybrad Jun 13, 2020
57fb5d9
New translations coc.md (French)
angrybrad Jun 13, 2020
51bf2ed
New translations assets.md (French)
angrybrad Jun 13, 2020
a4ec4b2
New translations assets.md (Japanese)
angrybrad Jun 13, 2020
5f34354
New translations categories-fields.md (French)
angrybrad Jun 13, 2020
9bcebd7
New translations categories-fields.md (Japanese)
angrybrad Jun 13, 2020
1736811
New translations categories.md (French)
angrybrad Jun 13, 2020
914fdd9
New translations categories.md (Japanese)
angrybrad Jun 13, 2020
5429d35
New translations changes-in-craft-3.md (French)
angrybrad Jun 13, 2020
835abee
New translations changes-in-craft-3.md (Japanese)
angrybrad Jun 13, 2020
06b2b7e
New translations checkboxes-fields.md (French)
angrybrad Jun 13, 2020
3b6b6ad
New translations checkboxes-fields.md (Japanese)
angrybrad Jun 13, 2020
805d102
New translations installation.md (Japanese)
angrybrad Jun 13, 2020
3bcd2ac
New translations lightswitch-fields.md (Japanese)
angrybrad Jun 13, 2020
4397d13
New translations tags-fields.md (Japanese)
angrybrad Jun 13, 2020
eee1ac8
New translations searching.md (Japanese)
angrybrad Jun 13, 2020
765614e
New translations sections-and-entries.md (French)
angrybrad Jun 13, 2020
5bca5b6
New translations sections-and-entries.md (Japanese)
angrybrad Jun 13, 2020
7225f70
New translations sites.md (French)
angrybrad Jun 13, 2020
ef1a27f
New translations sites.md (Japanese)
angrybrad Jun 13, 2020
4189cdc
New translations static-translations.md (French)
angrybrad Jun 13, 2020
8711db3
New translations static-translations.md (Japanese)
angrybrad Jun 13, 2020
b2e6d2a
New translations tags-fields.md (French)
angrybrad Jun 13, 2020
f5c3835
New translations testing-tips.md (French)
angrybrad Jun 13, 2020
cb84f50
New translations updating.md (French)
angrybrad Jun 13, 2020
298eeca
New translations updating.md (Japanese)
angrybrad Jun 13, 2020
fe9f609
New translations upgrade.md (French)
angrybrad Jun 13, 2020
342a1bc
New translations upgrade.md (Japanese)
angrybrad Jun 13, 2020
4554b06
New translations users-fields.md (French)
angrybrad Jun 13, 2020
d59fb2d
New translations users-fields.md (Japanese)
angrybrad Jun 13, 2020
a2ea4db
New translations users.md (French)
angrybrad Jun 13, 2020
e138c60
New translations searching.md (French)
angrybrad Jun 13, 2020
08fcacd
New translations matrix-fields.md (French)
angrybrad Jun 13, 2020
227d218
New translations matrix-fields.md (Japanese)
angrybrad Jun 13, 2020
fa1d57f
New translations multi-select-fields.md (French)
angrybrad Jun 13, 2020
6964c32
New translations multi-select-fields.md (Japanese)
angrybrad Jun 13, 2020
0e62e8b
New translations plugins.md (French)
angrybrad Jun 13, 2020
111633f
New translations requirements.md (Japanese)
angrybrad Jun 13, 2020
f8925fb
New translations plugins.md (Japanese)
angrybrad Jun 13, 2020
b4a4ea4
New translations project-config.md (French)
angrybrad Jun 13, 2020
e01a0a1
New translations project-config.md (Japanese)
angrybrad Jun 13, 2020
0c05e7f
New translations relations.md (French)
angrybrad Jun 13, 2020
41c22b2
New translations relations.md (Japanese)
angrybrad Jun 13, 2020
4b6a310
New translations requirements.md (French)
angrybrad Jun 13, 2020
8cf62f5
New translations testing-tips.md (Japanese)
angrybrad Jun 13, 2020
76477aa
New translations controllers.md (Japanese)
angrybrad Jun 13, 2020
e782dba
New translations queue.md (Japanese)
angrybrad Jun 13, 2020
658be49
New translations cp-templates.md (French)
angrybrad Jun 13, 2020
e45f010
New translations cp-templates.md (Japanese)
angrybrad Jun 13, 2020
938b027
New translations element-types.md (French)
angrybrad Jun 13, 2020
bc6f077
New translations element-types.md (Japanese)
angrybrad Jun 13, 2020
4eb8a9d
New translations environmental-settings.md (French)
angrybrad Jun 13, 2020
d6cd137
New translations environmental-settings.md (Japanese)
angrybrad Jun 13, 2020
cb7e686
New translations cp-section.md (French)
angrybrad Jun 13, 2020
9d40d8e
New translations migrations.md (French)
angrybrad Jun 13, 2020
b10170f
New translations migrations.md (Japanese)
angrybrad Jun 13, 2020
e222bbc
New translations module-guide.md (French)
angrybrad Jun 13, 2020
117a70d
New translations module-guide.md (Japanese)
angrybrad Jun 13, 2020
71a820f
New translations plugin-guide.md (French)
angrybrad Jun 13, 2020
cb0768a
New translations plugin-guide.md (Japanese)
angrybrad Jun 13, 2020
6a36439
New translations plugin-settings.md (French)
angrybrad Jun 13, 2020
56bd4ed
New translations cp-section.md (Japanese)
angrybrad Jun 13, 2020
8fd874d
New translations coding-guidelines.md (Japanese)
angrybrad Jun 13, 2020
f14bf22
New translations plugin-store.md (French)
angrybrad Jun 13, 2020
2d0b64e
New translations tags.md (French)
angrybrad Jun 13, 2020
bdd4777
New translations filters.md (French)
angrybrad Jun 13, 2020
86007c9
New translations filters.md (Japanese)
angrybrad Jun 13, 2020
e1a3e61
New translations functions.md (French)
angrybrad Jun 13, 2020
0811015
New translations functions.md (Japanese)
angrybrad Jun 13, 2020
e1dcb4c
New translations global-variables.md (French)
angrybrad Jun 13, 2020
bb519df
New translations global-variables.md (Japanese)
angrybrad Jun 13, 2020
1d27f10
New translations tags.md (Japanese)
angrybrad Jun 13, 2020
15719d7
New translations coding-guidelines.md (French)
angrybrad Jun 13, 2020
ef5381f
New translations tests.md (French)
angrybrad Jun 13, 2020
5f6381d
New translations tests.md (Japanese)
angrybrad Jun 13, 2020
137f24b
New translations twig-primer.md (French)
angrybrad Jun 13, 2020
54e21c4
New translations twig-primer.md (Japanese)
angrybrad Jun 13, 2020
3e18409
New translations README.md (French)
angrybrad Jun 13, 2020
6e6a0c6
New translations README.md (Japanese)
angrybrad Jun 13, 2020
ad4f60a
New translations changelogs-and-updates.md (French)
angrybrad Jun 13, 2020
3a5a15c
New translations changelogs-and-updates.md (Japanese)
angrybrad Jun 13, 2020
f80b383
New translations plugin-settings.md (Japanese)
angrybrad Jun 13, 2020
10ff5ed
New translations plugin-store.md (Japanese)
angrybrad Jun 13, 2020
b6b8622
New translations queue.md (French)
angrybrad Jun 13, 2020
becda25
New translations support-classes.md (French)
angrybrad Jun 13, 2020
9df7189
New translations extending-system-components.md (French)
angrybrad Jun 13, 2020
220352c
New translations extending-system-components.md (Japanese)
angrybrad Jun 13, 2020
4ee8299
New translations assertion-helpers.md (French)
angrybrad Jun 13, 2020
3a85bc2
New translations assertion-helpers.md (Japanese)
angrybrad Jun 13, 2020
7baa295
New translations config-options.md (French)
angrybrad Jun 13, 2020
4c8f489
New translations config-options.md (Japanese)
angrybrad Jun 13, 2020
c43a4c5
New translations full-mock.md (French)
angrybrad Jun 13, 2020
f237c47
New translations full-mock.md (Japanese)
angrybrad Jun 13, 2020
679f56d
New translations mocking.md (French)
angrybrad Jun 13, 2020
d68b0fb
New translations mocking.md (Japanese)
angrybrad Jun 13, 2020
660d177
New translations support-classes.md (Japanese)
angrybrad Jun 13, 2020
8553acd
New translations element-exporter-types.md (French)
angrybrad Jun 13, 2020
87a1d38
New translations console.md (French)
angrybrad Jun 13, 2020
b1362bb
New translations console.md (Japanese)
angrybrad Jun 13, 2020
b24662d
New translations events.md (French)
angrybrad Jun 13, 2020
12f5429
New translations events.md (Japanese)
angrybrad Jun 13, 2020
60d53f0
New translations fixtures.md (French)
angrybrad Jun 13, 2020
6ba7f37
New translations fixtures.md (Japanese)
angrybrad Jun 13, 2020
85bd499
New translations getting-started.md (French)
angrybrad Jun 13, 2020
b8c5530
New translations getting-started.md (Japanese)
angrybrad Jun 13, 2020
09649f6
New translations plugins-and-modules.md (French)
angrybrad Jun 13, 2020
b96ac8a
New translations plugins-and-modules.md (Japanese)
angrybrad Jun 13, 2020
b37b9c2
New translations element-exporter-types.md (Japanese)
angrybrad Jun 13, 2020
eba1605
New translations controllers.md (French)
angrybrad Jun 13, 2020
2a4a6dc
New translations project-config.md (French)
angrybrad Jun 13, 2020
305cd28
New translations project-config.md (Japanese)
angrybrad Jun 13, 2020
25c5715
New translations services.md (Japanese)
angrybrad Jun 13, 2020
30f2c63
New translations soft-deletes.md (French)
angrybrad Jun 13, 2020
d5e1609
New translations soft-deletes.md (Japanese)
angrybrad Jun 13, 2020
1128641
New translations template-roots.md (French)
angrybrad Jun 13, 2020
722776f
New translations template-roots.md (Japanese)
angrybrad Jun 13, 2020
8f22afb
New translations updating-plugins.md (French)
angrybrad Jun 13, 2020
584c5e8
New translations commands.md (Japanese)
angrybrad Jun 13, 2020
320b7ee
New translations updating-plugins.md (Japanese)
angrybrad Jun 13, 2020
115b228
New translations commands.md (French)
angrybrad Jun 13, 2020
8420700
New translations users.md (Japanese)
angrybrad Jun 13, 2020
fb5ba0c
New translations plugin-settings.md (French)
angrybrad Jun 16, 2020
0507b83
New translations plugin-settings.md (Japanese)
angrybrad Jun 16, 2020
df0d1e1
New translations element-exporter-types.md (Japanese)
angrybrad Jun 18, 2020
8cc4d9b
New translations element-exporter-types.md (French)
angrybrad Jun 18, 2020
f20d2ed
New translations field-types.md (French)
angrybrad Jun 18, 2020
fb10b96
New translations field-types.md (Japanese)
angrybrad Jun 18, 2020
3c829c9
New translations element-types.md (Japanese)
angrybrad Jun 18, 2020
42b3fcb
New translations element-types.md (French)
angrybrad Jun 18, 2020
cae0e68
New translations extending-system-components.md (French)
angrybrad Jun 18, 2020
36c7b9f
New translations extending-system-components.md (Japanese)
angrybrad Jun 18, 2020
5566cd2
New translations element-exporter-types.md (French)
angrybrad Jun 23, 2020
210d2a4
New translations element-exporter-types.md (Japanese)
angrybrad Jun 23, 2020
0c6a106
New translations tags.md (French)
angrybrad Jun 23, 2020
3cddf06
New translations tags.md (Japanese)
angrybrad Jun 23, 2020
b986944
New translations app.md (Japanese)
angrybrad Jun 23, 2020
02746f9
New translations app.md (French)
angrybrad Jun 23, 2020
ce17d91
New translations matrix-fields.md (French)
angrybrad Jul 6, 2020
ecf3d53
New translations matrix-fields.md (Japanese)
angrybrad Jul 6, 2020
dbb1f3f
New translations graphql.md (French)
angrybrad Jul 7, 2020
e5d8ed1
New translations graphql.md (Japanese)
angrybrad Jul 7, 2020
962f046
New translations updating.md (French)
angrybrad Jul 9, 2020
69d3565
New translations updating.md (Japanese)
angrybrad Jul 9, 2020
9a902c3
New translations element-types.md (French)
angrybrad Jul 11, 2020
3ed191e
New translations element-types.md (Japanese)
angrybrad Jul 11, 2020
2f61f74
New translations cp-section.md (French)
angrybrad Jul 14, 2020
176ac6c
New translations cp-section.md (Japanese)
angrybrad Jul 14, 2020
0bc2bd2
New translations extending-system-components.md (French)
angrybrad Jul 14, 2020
ec46877
New translations element-types.md (Japanese)
angrybrad Jul 14, 2020
58873d6
New translations element-types.md (French)
angrybrad Jul 14, 2020
228ccd7
New translations extending-system-components.md (Japanese)
angrybrad Jul 14, 2020
68fdef8
New translations updating.md (French)
angrybrad Jul 15, 2020
17df34f
New translations updating.md (Japanese)
angrybrad Jul 15, 2020
7a1deb3
New translations field-types.md (French)
angrybrad Jul 15, 2020
46db1da
New translations field-types.md (Japanese)
angrybrad Jul 15, 2020
f42e0da
New translations installation.md (Japanese)
angrybrad Jul 15, 2020
f595767
New translations installation.md (French)
angrybrad Jul 15, 2020
8af004f
New translations changes-in-craft-3.md (Japanese)
angrybrad Jul 15, 2020
05c7e18
New translations changes-in-craft-3.md (French)
angrybrad Jul 15, 2020
b83d628
New translations localization.md (Japanese)
angrybrad Jul 15, 2020
a15eb2a
New translations translation-categories.md (Japanese)
angrybrad Jul 15, 2020
f6f6e97
New translations asset-bundles.md (Japanese)
angrybrad Jul 15, 2020
8ec80a6
New translations localization.md (French)
angrybrad Jul 15, 2020
84d54aa
New translations translation-categories.md (French)
angrybrad Jul 15, 2020
e2709e8
New translations asset-bundles.md (French)
angrybrad Jul 15, 2020
cb219a4
New translations module-guide.md (Japanese)
angrybrad Jul 15, 2020
c6c019d
New translations plugin-guide.md (Japanese)
angrybrad Jul 15, 2020
534d03a
New translations plugin-guide.md (French)
angrybrad Jul 15, 2020
9fa1f02
New translations module-guide.md (French)
angrybrad Jul 15, 2020
c4fe4d2
New translations graphql.md (Japanese)
angrybrad Jul 16, 2020
585dd52
New translations graphql.md (French)
angrybrad Jul 16, 2020
6f91806
New translations entry-form.md (French)
angrybrad Jul 17, 2020
79ceaa7
New translations user-profile-form.md (Japanese)
angrybrad Jul 17, 2020
9662927
New translations user-profile-form.md (French)
angrybrad Jul 17, 2020
ea19b9d
New translations entry-form.md (Japanese)
angrybrad Jul 17, 2020
0072940
New translations getting-started.md (French)
angrybrad Jul 23, 2020
1d9832f
New translations getting-started.md (Japanese)
angrybrad Jul 23, 2020
9c22a9b
New translations tags.md (Japanese)
angrybrad Jul 26, 2020
c3d6929
New translations tags.md (French)
angrybrad Jul 26, 2020
7d9ebcb
New translations relations.md (Japanese)
angrybrad Jul 29, 2020
87f0d37
New translations relations.md (French)
angrybrad Jul 29, 2020
5228e3b
New translations headless.md (French)
angrybrad Jul 29, 2020
a65c8ea
New translations headless.md (Japanese)
angrybrad Jul 29, 2020
ab3fb97
New translations config-settings.md (French)
angrybrad Jul 29, 2020
5c68490
New translations config-settings.md (Japanese)
angrybrad Jul 29, 2020
b43be9f
New translations category-queries.md (Japanese)
angrybrad Jul 31, 2020
8d62932
New translations category-queries.md (French)
angrybrad Jul 31, 2020
cb4b7ac
New translations category-queries.md (Japanese)
angrybrad Jul 31, 2020
0b0d68e
New translations category-queries.md (French)
angrybrad Jul 31, 2020
f2e8c74
New translations assets-fields.md (Japanese)
angrybrad Aug 3, 2020
32698ab
New translations assets-fields.md (French)
angrybrad Aug 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions fr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Craft is a flexible, user-friendly CMS for creating custom digital experiences o

It features:

- An intuitive, user-friendly Control Panel for content creation and administrative tasks.
- An intuitive, user-friendly control panel for content creation and administrative tasks.
- A clean-slate approach to content modeling and [front-end development](dev/README.md) that doesn’t make any assumptions about your content or how it should be consumed.
- A built-in Plugin Store with hundreds of free and commercial [plugins](https://plugins.craftcms.com/), all just a click away.
- A robust framework for [module and plugin development](extend/README.md).
Expand All @@ -29,8 +29,10 @@ Craft is a self-hosted PHP 7 application, built on [Yii 2](https://www.yiiframew

## Diving In

If you’re new to Craft CMS the best place to start is [the tutorial](https://docs.craftcms.com/tutorial/).

To start getting acquainted with how content modeling works in Craft, read [Sections and Entries](sections-and-entries.md) and [Fields](fields.md).

When you’re ready to install Craft, read [Server Requirements](requirements.md) and [Installation Instructions](installation.md).
Before installing, check out the [Server Requirements](requirements.md) and [Installation Instructions](installation.md).

Finally, read the [Front-End Development](dev/README.md) section when you’re ready to start building out the front-end of your site or application.
100 changes: 74 additions & 26 deletions fr/assets-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ Subfolder paths defined by the “Upload Location” and “Default Upload Locat

Any properties supported by the source element (the element that has the Assets field) can be used here.

::: tip
If you want to include the entry’s ID or UID in a dynamic subfolder path, use `{sourceId}` or `{sourceUid}` rather than `{id}` or `{uid}`, so the source entry’s ID or UID is used rather than the revision / draft’s.
:::

::: tip
If you are creating the Assets field within a [Matrix field](matrix-fields.md), the source element is going to be the Matrix block, _not_ the element that the Matrix field is being created on.

Expand All @@ -52,6 +56,10 @@ Assets fields list all of the currently-related assets, with a button to select

Clicking the “Add an asset” button will bring up a modal window where you can find and select additional assets, as well as upload new ones.

::: tip
You can also upload assets by dragging files directly onto the assets field or modal window.
:::

### Inline Asset Editing

When you double-click on a related asset, a HUD will appear where you can edit the asset’s title and custom fields, and launch the Image Editor (if it’s an image).
Expand All @@ -68,10 +76,15 @@ When [querying for elements](dev/element-queries/README.md) that have an Assets

Possible values include:

| Value | Fetches elements…
| - | -
| `':empty:'` | that don’t have any related assets.
| `':notempty:'` | that have at least one related asset.
| Value | Fetches elements… |
| ----------------------------------------------------------- | ------------------------------------------------------- |
| `':empty:'` | that don’t have any related assets. |
| `':notempty:'` | that have at least one related asset. |
| `100` | that are related to the asset with an ID of 100. |
| `[100, 200]` | that are related to an asset with an ID of 100 or 200. |
| `['and', 100, 200]` | that are related to the assets with IDs of 100 and 200. |
| an [Asset](api:craft\elements\Asset) object | that are related to the asset. |
| an [AssetQuery](api:craft\elements\db\AssetQuery) object | that are related to any of the resulting assets. |

```twig
{# Fetch entries with a related asset #}
Expand Down Expand Up @@ -103,6 +116,10 @@ To loop through all of the related assets, call [all()](api:craft\db\Query::all(
{% endif %}
```

::: warning
When using `asset.url` or `asset.getUrl()`, the asset’s source volume must have “Assets in this volume have public URLs” enabled and a “Base URL” setting. Otherwise, the result will always be empty.
:::

If you only want the first related asset, call [one()](api:craft\db\Query::one()) instead, and then make sure it returned something:

```twig
Expand Down Expand Up @@ -132,40 +149,71 @@ You can set [parameters](dev/element-queries/asset-queries.md#parameters) on the
It’s always a good idea to clone the asset query using the [clone()](./dev/functions.md#clone) function before adjusting its parameters, so the parameters don’t have unexpected consequences later on in your template.
:::

### Uploading Files from Front-End Entry Forms
### Saving Assets Fields in Entry Forms

If you want to allow users to upload files to an Assets field from a front-end [entry form](dev/examples/entry-form.md), you just need to do two things.
If you have an [entry form](dev/examples/entry-form.md) that needs to contain an Assets field, you will need to submit your field value as a list of asset IDs, in the order you want them to be related.

First, make sure your `<form>` tag has an `enctype="multipart/form-data"` attribute, so that it is capable of uploading files.
For example, you could create a list of checkboxes for each of the possible relations:

```markup
<form method="post" accept-charset="UTF-8" enctype="multipart/form-data">
```twig
{# Include a hidden input first so Craft knows to update the
existing value, if no checkboxes are checked. #}
{{ hiddenInput('fields[<FieldHandle>]', '') }}

{# Get all of the possible asset options #}
{% set possibleAssets = craft.assets()
.volume('siteAssets')
.kind('image')
.orderBy('filename ASC')
.withTransforms([
{ width: 100, height: 100 }
])
.all() %}

{# Get the currently related asset IDs #}
{% set relatedAssetIds = entry is defined
? entry.<FieldHandle>.ids()
: [] %}

<ul>
{% for possibleAsset in possibleAssets %}
<li>
<label>
{{ input('checkbox', 'fields[<FieldHandle>][]', possibleAsset.id, {
checked: possibleAsset.id in relatedAssetIds
}) }}
{{ tag('img', {
src: possibleAsset.
}) }}
{{ possibleAsset.getImg({width: 100, height: 100}) }}
{{ possibleAsset.filename }}
</label>
</li>
{% endfor %}
</ul>
```

Then add a file input to the form:
You could then make the checkbox list sortable, so users have control over the order of related assets.

```markup
<input type="file" name="fields[<FieldHandle>]">
```
#### Creating New Assets

::: tip
Replace `<FieldHandle>` with you actual field handle. For example if you field handle is “heroImage”, the input name should be `fields[heroImage]`.
:::
Assets fields can handle new file uploads as well:

If you want to allow multiple file uploads, add the `multiple` attribute and add `[]` to the end of the input name:

```markup
<input type="file" name="fields[<FieldHanlde>][]" multiple>
```twig
{{ input('file', 'fields[<FieldHandle>][]', options={
multiple: true,
}) }}
```

If you want to add files to a field with existing assets, you will need to first fetch the existing asset ids and add them to a hidden field:
::: tip
Don’t forget to set `enctype="multipart/form-data"` on your `<form>` tag so your browser knows to submit the form as a multipart request.
:::

```
{% for asset in entry.<FieldHanlde> %}
<input type="hidden" name="fields[<FieldHanlde>][]" value="{{ asset.id }}">
{% endfor %}
Alternatively, you can submit Base64-encoded file data, which the Assets field will decode and treat as an uploaded file. To do that, you have to specify both the data and the filename like this:

<input type="file" name="fields[<FieldHanlde>][]" multiple>
```twig
{{ hiddenInput('fields[<FieldHandle>][data][]', 'data:image/jpeg;base64,<BASE64DATA>') }}
{{ hiddenInput('fields[<FieldHandle>][filename][]', 'myFile.ext') }}
```

## See Also
Expand Down
2 changes: 1 addition & 1 deletion fr/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Any fields you select here will be visible in the asset editor HUD that opens up

## Assets Page

When you create your first volume, an “Assets” item will be added to the main Control Panel navigation. Clicking on it will take you to the Assets page, which shows a list of all of your volumes in the left sidebar, and the selected volume’s files in the main content area.
When you create your first volume, an “Assets” item will be added to the main control panel navigation. Clicking on it will take you to the Assets page, which shows a list of all of your volumes in the left sidebar, and the selected volume’s files in the main content area.

From this page, you can do the following:

Expand Down
29 changes: 23 additions & 6 deletions fr/categories-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@ You can set [parameters](dev/element-queries/category-queries.md#parameters) on

Possible values include:

| Value | Fetches elements… |
| -------------- | ---------------------------------------- |
| `':empty:'` | that don’t have any related categories. |
| `':notempty:'` | that have at least one related category. |
| Value | Fetches elements… |
| ----------------------------------------------------------------- | ----------------------------------------------------------- |
| `':empty:'` | that don’t have any related categories. |
| `':notempty:'` | that have at least one related category. |
| `100` | that are related to the category with an ID of 100. |
| `[100, 200]` | that are related to a category with an ID of 100 or 200. |
| `['and', 100, 200]` | that are related to the categories with IDs of 100 and 200. |
| an [Category](api:craft\elements\Category) object | that are related to the category. |
| an [CategoryQuery](api:craft\elements\db\CategoryQuery) object | that are related to any of the resulting categories. |

```twig
{% set relatedCategories = entry.<FieldHandle>.all() %}
Expand Down Expand Up @@ -111,8 +116,20 @@ To loop through all of the related categories as a flat list, call [all()](api:c
Or you can show them as a hierarchical list with the [nav](dev/tags/nav.md) tag:

```twig
{% if entry.<FieldHandle>.exists() %}
<p>There are related categories!</p>
{% set relatedCategories = entry.<FieldHandle>.all() %}
{% if relatedCategories|length %}
<ul>
{% nav rel in relatedCategories %}
<li>
<a href="{{ rel.url }}">{{ rel.title }}</a>
{% ifchildren %}
<ul>
{% children %}
</ul>
{% endifchildren %}
</li>
{% endnav %}
</ul>
{% endif %}
```

Expand Down
2 changes: 1 addition & 1 deletion fr/categories.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ You can also add additional fields using all of the available field types in Cra

## Creating and Editing Categories

If you have at least one category group, there will be a “Categories” tab in the primary Control Panel navigation. Clicking on it will take you to the category index. From there you can choose a category group from the sidebar, and add/reorder/delete categories within it:
If you have at least one category group, there will be a “Categories” tab in the primary control panel navigation. Clicking on it will take you to the category index. From there you can choose a category group from the sidebar, and add/reorder/delete categories within it:

![Category Index](./images/categories-category-index.png)

Expand Down
12 changes: 8 additions & 4 deletions fr/changes-in-craft-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ The “Position Select” field type has been removed from Craft 3. If you had a

If you miss Position Select, you can try installing the [Position Fieldtype](https://github.com/Rias500/craft-position-fieldtype) plugin, which brings it back.

## Lightswitch Fields

Lightswitch field values are now always `true` or `false`. If you’re accessing a Lightswitch field value for an element that doesn’t have an explicit value set yet, the field’s default value will be returned instead.

## Remote Volumes

Support for Amazon S3, Rackspace Cloud Files, and Google Cloud Storage have been moved into plugins. If you have any asset volumes that were using those services in Craft 2, you will need to install the new plugins:
Expand Down Expand Up @@ -132,7 +136,7 @@ The acceptable translation categories are:

In Craft 3, your `translations/` folder might look something like this:

```
```treeview
translations/
└── de/
├── app.php
Expand Down Expand Up @@ -449,14 +453,14 @@ That made it possible to execute variations of an element query, without affecti
{% set totalEntries = query.total() %}
```

Here `.type()` is applying the `type` parameter to a *clone* of `query`, so it had no effect on `query.total()`, which will still return the total number of News entries, regardless of their entry types.
Here `.type()` is applying the `type` parameter to a _clone_ of `query`, so it had no effect on `query.total()`, which will still return the total number of News entries, regardless of their entry types.

This behavior has changed in Craft 3, though. Now any time you call a parameter-setter method, the method will:

1. set the parameter value on the current element query
2. return the element query

Which means in the above code example, `totalEntries` will be set to the total *Article* entries, as the `type` parameter will still be applied.
Which means in the above code example, `totalEntries` will be set to the total _Article_ entries, as the `type` parameter will still be applied.

If you have any templates that count on the Craft 2 behavior, you can fix them using the [clone()](dev/functions.md#clone-object) function.

Expand Down Expand Up @@ -571,7 +575,7 @@ Your front-end `<form>`s and JS scripts that submit to a controller action will

### `action` Params

`action` params must be rewritten in in `kebab-case` rather than `camelCase`.
`action` params must be rewritten in `kebab-case` rather than `camelCase`.

```twig
Old:
Expand Down
12 changes: 6 additions & 6 deletions fr/checkboxes-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ When [querying for elements](dev/element-queries/README.md) that have a Checkbox

Possible values include:

| Value | Fetches elements…
| - | -
| `'foo'` | with a `foo` option checked.
| `'not foo'` | without a `foo` option checked.
| `['foo', 'bar']` | with `foo` or `bar` options selected.
| `['and', 'foo', 'bar']` | with `foo` and `bar` options selected.
| Value | Fetches elements… |
| ----------------------- | -------------------------------------- |
| `'foo'` | with a `foo` option checked. |
| `'not foo'` | without a `foo` option checked. |
| `['foo', 'bar']` | with `foo` or `bar` options selected. |
| `['and', 'foo', 'bar']` | with `foo` and `bar` options selected. |

```twig
{# Fetch entries with the 'foo' option checked #}
Expand Down
2 changes: 1 addition & 1 deletion fr/coc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Diversity is one of our strengths. With that, challenges will arise that can lea

This isn’t an exhaustive list of things that you can’t do. Rather, take it in the spirit in which it’s intended - a guide to make it easier to enrich all of us and the technical communities in which we participate.

This code of conduct applies to all spaces used by the Craft community for communication. This includes Craft Slack, Craft CMS Stack Exchange, GitHub, Twitter, Facebook, meetups, conferences, and any other relevant forums. Violations of this code outside of any spaces managed by the Craft team will still affect a person’s ability to participate within them.
This code of conduct applies to all spaces used by the Craft community for communication. This includes Craft Discord, Craft CMS Stack Exchange, GitHub, Twitter, Facebook, meetups, conferences, and any other relevant forums. Violations of this code outside of any spaces managed by the Craft team will still affect a person’s ability to participate within them.

If you believe someone is violating the code of conduct, we ask that you report it by contacting us from [craftcms.com/contact](https://craftcms.com/contact). We take all reports seriously, and your identity will remain confidential.

Expand Down
Loading