4

In the Dashboard, while editing the settings of a Matrix Block — the instructions for setting Upload Location for an Assets field says Note that the subfolder path can contain variables like {owner.slug} or {owner.author.username}.

To what does owner refer?

Ideally I want to store these assets in Site Assets/pages/{slug of the page this block is on} — is owner the page name or the username or what?

maxfenton
  • 97
  • 5

1 Answers1

6

owner is the element which contains your Matrix field.

For example, if you attach a Matrix field to a Section, the owner would be the specific Entry in that Section.

  • {owner.slug} - The slug of your entry.
  • {owner.author.username} - The username of the person who created the entry.
Lindsey D
  • 23,974
  • 5
  • 53
  • 110