From 9638e579e0da048ea278cfeee6cba77836520aa7 Mon Sep 17 00:00:00 2001 From: Yuliya Pazniak Date: Sat, 11 Jan 2025 17:04:52 +0300 Subject: [PATCH] update Fields binding description --- datapress/binding/fields.md | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/datapress/binding/fields.md b/datapress/binding/fields.md index 0808b5f..3403932 100644 --- a/datapress/binding/fields.md +++ b/datapress/binding/fields.md @@ -24,25 +24,28 @@ Premium feature! This feature is available in the addon to the premium extension ::: -With the Dataverse Integration Fields Binding plugin available in the Addons, you can work with custom fields, allowing you to display any text before displaying the field value and formatting the field value. +With the Dataverse Integration Fields Binding plugin available in the Addons, you can work with custom fields, allowing you to display any text before displaying the field value and format the field value. To use this plugin, follow the steps below: -1. Create a page, click `Preferences`, and open the `Panel` settings. -2. Add extra areas to the editor by choosing `Custom fields` option. Click `Enable & Reload` to see the Custom fields section. -3. At the bottom of the page, create a name for custom field(s). Save and publish the page. -4. Go to the pages list, find the page you created and click `Configure Binding` to choose the table to bind. -5. In the Dataverse Admin Area, go to `Bindings` -> `Fields Binding`. Here, you can set pre-rendering Twig code that will execute before rendering Twig expression substitution. You can use it to retrieve data, define variables, etc. -6. Click `Create Binding`, and choose the page that was created earlier. Then select `Add Field` and choose the custom field created for the page. -Additionally, the following options will replace a field: +1. In the Dataverse Admin Area, navigate to Bindings -> Fields Binding. Here, you can set pre-rendering Twig code that will execute before rendering Twig expression substitution. Use this to retrieve data, define variables, and more. +2. Select `Add field` to choose the custom field to display or click `Create field` to create a new custom field. +3. Add a table from which to retrieve data. +4. Click Save. +5. Return to the WordPress Admin Area and create a page. Click `Preferences`, then open the `Panel` settings. +6. Add extra areas to the editor by choosing `Custom fields` option. Click `Enable & Reload` to see the Custom fields section. +7. At the bottom of the page, create a name for custom field(s). Save and publish the page. +8. Go to the pages list, find the page you created and click `Configure Binding` to choose the table to bind and how to bind the post. -- Twig Expression (type Twig expression to display it as the field value) -- Column (choose the column logical name from the drop-down) -- Twig Template (choose the Twig template, which is in Templates -> Twig templates) -- Formatted Column (choose the column logical name from the drop-down). +Additionally, the following options can replace a field: -Add the output of the meta field to your template: +- **Twig Expression:** Type a Twig expression to display it as the field value. +- **Column:** Choose the column logical name from the drop-down. +- **Twig Template:** Choose the Twig template, which can be found under `Templates` -> `Twig Templates`. +- **Formatted Column:** Choose the column logical name from the drop-down. -```php - -``` +:::note + +The selected table in the Configure Binding item must match the table for this custom field in the Dataverse Admin Area. + +:::