statamic / v2-docs

Statamic v2 Documentation
https://v2.statamic.com
54 stars 133 forks source link

Correction of finer-grained column explananation #457

Closed bastihilger closed 4 years ago

bastihilger commented 4 years ago

The yaml formatting was incorrect: a colon behind title is needed and the dash before value was incorrect.

jasonvarga commented 4 years ago

That's not correct. Are you having trouble with this syntax?

bastihilger commented 4 years ago

Oh - I am sorry, I wrote it like it shows in the docs and it didn't work, then wrote it like in my "correction" and it worked.

bastihilger commented 4 years ago

I think I found my mistake - I wrote

  - year
  - value: year
    header: Jahr

which should just have been

  - value: year
    header: Jahr

Sorry again.

jasonvarga commented 4 years ago

That example in the docs shows that the first item is just a string (title), and the second item is an array (with value, extra, width, header, and link keys).

If you were to write it in PHP it would look like:

'columns' => [
  'title',
  [
    'value' => 'slug',
    'extra' => true,
    'width' => 25,
    'header' => 'The Slug',
    'link' => true,
  ],
]

Maybe that makes it clearer?

bastihilger commented 4 years ago

Yep, thanks!