From e7125cc11e5161f0bc5b2e3f86546ec428e9fecd Mon Sep 17 00:00:00 2001 From: Yuri Salimovskiy Date: Mon, 27 Oct 2025 15:23:51 +0200 Subject: [PATCH] Use `{file:XX:title}`, `{file:XX:description}` in other fields --- docs/fieldtypes/textarea.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/fieldtypes/textarea.md b/docs/fieldtypes/textarea.md index 3169f966b..f4bc82c83 100755 --- a/docs/fieldtypes/textarea.md +++ b/docs/fieldtypes/textarea.md @@ -13,6 +13,8 @@ The Textarea is a simple free-form writing space where you can enter text or HTM ![textarea field](_images/field_textarea.png) +[TOC=2] + ## Field Settings ### Textarea Row Height @@ -34,3 +36,21 @@ Either left-to-right, or right-to-left. ### Field Tools Show formatting buttons to make writing markup easier, show a smiley chooser, or show a file chooser button to easily insert images or links to files. + +## Parsing File Tags + +The Textarea fieldtype supports the use of file tags in the format `{file:XX:field}` where `XX` is the file ID and `field` is any field associated with that file, such as `url`, `filename`, `title`, etc. + +When the content of a Textarea field is parsed for display, these tags will be replaced with the corresponding values from the file model. + +For example, if you have a file with ID `5`, and you want to insert its URL into the Textarea content, you would use the tag `{file:5:url}`. When the content is rendered, this tag will be replaced with the actual URL of the file. + +The supported fields for file tags include: +- `url`: The absolute URL to the file. +- `file_name`: The name of the file. +- `title`: The title of the file. +- `description`: The description of the file. +- `file_size`: The size of the file in bytes. +- `mime_type`: The MIME type of the file. +- `location`: Where the photo was taken +- `credits`: Photo credits \ No newline at end of file