Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Prokyonn committed Apr 19, 2021
1 parent 23f4428 commit f21d3ef
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Resources/doc/article-view-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,28 @@ is requested (content-types, smart-content, ...).
| targetWebspace | string | Recommended webspace key |
| mainWebspace | string | Configured main webspace |
| additionalWebspaces | string[] | Configured additional webspaces |
| contentFields | string[] | Contains content properties tagged with `sulu.search.field` |

The `content` and `view` property is represented by a proxy to avoid resolving data where it is not needed.

### ContentFields

The content of the property `contentFields` can be customized. All properties which are tagged with
`sulu.search.field` in the xml configuration, are automatically added to this field. The main purpose of this field
is to give the developer enough data and flexibility to implement search functionality via e.g. a `SearchController`.

Example:
```xml
<property name="text" type="text_editor" mandatory="true">
<meta>
<title lang="en">Text</title>
<title lang="de">Text</title>
</meta>

<tag name="sulu.search.field"/>
</property>
```

## How to extend?

To extend the indexed data you can extend the `ArticleViewDocument`. This can be achieved by performing the following
Expand Down

0 comments on commit f21d3ef

Please sign in to comment.