Skip to content

Commit

Permalink
update fields binding description
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuliya Pazniak committed Jan 17, 2025
1 parent f8568cd commit d67adb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
14 changes: 4 additions & 10 deletions datapress/binding/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ At the bottom of the page, select the custom field(s) created in the Dataverse A
9. **Add the output of the meta field to your template:**

```
add_filter('integration-cds/twig/functions', function( $functionsArray ) {
$functionsArray['getMeta'] = new TwigFunction('getMeta',function($metaName){
return get_post_meta(get_the_ID(), $metaName); });
return $functionsArray;}, 10, 5 );
add_filter('integration-cds/twig/functions', function ($functionsArray) {
$functionsArray['getMeta'] = new Twig\TwigFunction('getMeta', function ($metaName) {
return get_post_meta(get_the_ID(), $metaName); });
return $functionsArray;}, 10, 5);
```

10. **Configure Binding**
Expand All @@ -82,10 +82,4 @@ Additionally, the following options can replace a field:

The selected table in the Configure Binding item must match the table for this custom field in the Dataverse Admin Area.

:::

:::note

When adding custom fields, you may encounter an empty content of a page. Follow [these steps](/knowledge-base/empty-page-after-custom-field) to resolve the issue.

:::

This file was deleted.

0 comments on commit d67adb7

Please sign in to comment.