More examples in the File Fieldtype page

オープン
#1,102 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
46/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php
領域
documentation

調査の方向性

Start with the File Fieldtype page at docs/fieldtypes/file.html and compare its modifier tag example with the two syntaxes in the issue. Confirm which syntax gives the file title rather than the entry title, then add clear examples to the page showing the expected output. Done means the examples work for the relevant tags and explain when to use each syntax.

索引モデルが issue の本文から書いたものです。

説明

Suggested Change
Please add more examples into the File Fieldtype page (https://docs.expressionengine.com/latest/fieldtypes/file.html) ... and honestly, just everywhere in the User Guide.

Reasoning
The one example (https://docs.expressionengine.com/latest/fieldtypes/file.html#using-as-modifier-tags-pairs) that is provided does not work correctly with all of the template tags (for example, does not work with {title} ), therefore you have to make weird workarounds. For example, based on the example this should work:

{news_image:webp}
    <img src="{url}" alt="{title}">
  {/news_image:webp}

Whilst the {url} tag works correctly (returns the .webp file url) ... the {title} tag does not work ... it returns the 'entry' {title}, not the 'file' {title}.

I raised this on Slack, and was told that I had to use the following syntax (which I believe is weird and wrong, but does work).

<img src=“{news_image:webp}” alt=“{news_image}{title}{/news_image}”>

If this is in fact the correct syntax, then it would be good to have a few examples showing this kind of result.

Additional context
I do wonder if this is actually just a bug with the File Fieldtype tags ... and not actually an issue with the docs ... but I honestly don't know, as there are no good examples in the docs!

主要言語
CSS
スター
22
フォーク
79
平均マージ
2日 1時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ExpressionEngine/ExpressionEngine-User-Guide のほかの issue

ExpressionEngine/ExpressionEngine-User-Guide の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。