-
Notifications
You must be signed in to change notification settings - Fork 0
DocumentComponent
Jens Kooij edited this page Mar 25, 2018
·
3 revisions
The DocumentComponentis used for retrieving a document, wheter that is through the given uri or be it a static document.
| Sitemap Compatible | Application Compatible | Parameters |
|---|---|---|
| true | true | folder, document, documentParameterName |
[Optional]
The parameter folder sets the folder in which the component will look for the document.
[Optional]
The parameter document sets the document which it should retrieve and make available to the template.
[Optional]
By default documentParameterName is set to "document", meaning that in the template the variable $document contains the retrieved document.
Example using the matched uri to select the document. The example below will try to fetch the document with a corresponding path for all request to uri /nl/path/to/document-name
| Title | URL | Regex | Component | Template | Parameters |
|---|---|---|---|---|---|
| Dutch pages | /^/nl/(.*)/ | true | DocumentComponent | base | folder: "pages/dutch/" |
Example using a static document, which will fetch the document "My Page" on uri /my-page
| Title | URL | Regex | Component | Template | Parameters |
|---|---|---|---|---|---|
| My page | /my-page | false | DocumentComponent | base | folder: "pages/" |
| document: "my-page" | |||||
| documentParameterName: "myPage" |