Skip to content

Commit ba17eb5

Browse files
committed
Document new possibility to provide custom info templates by dropping a file in info_templates
1 parent 3ebca82 commit ba17eb5

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

src/topics/FeatureInfo.md

+24-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,30 @@ By default, the identify dialog in QWC2 allows you to export the results to `jso
7070

7171
### Custom HTML templates<a name="html-templates"></a>
7272

73-
You can specify a custom HTML template for displaying the feature rather than the default table view by using the `qwc-feature-info-service` and providing the template in the `featureInfo` service configuration in `tenantConfig.json`, either inline or as a path:
73+
You can specify a custom HTML template for displaying the feature rather than the default table view by [enabling](../configuration/ServiceConfiguration.md#enabling-services) the `qwc-feature-info-service`.
74+
75+
Mount the info templates folder into the `qwc-feature-info-service` container, i.e.:
76+
```yml
77+
qwc-feature-info-service:
78+
image: sourcepole/qwc-feature-info-service:vYYYY.MM.DD
79+
volumes:
80+
...
81+
- ./volumes/info_templates:/info_templates
82+
```
83+
84+
*Note:* If mounting to another location than `/info_templates`, set the `info_templates_path` in the `featureInfo` service configuration in `tenantConfig.json`:
85+
```json
86+
{
87+
"name": "featureInfo",
88+
"config": {
89+
"info_templates_path": "/<path>/"
90+
}
91+
}
92+
```
93+
94+
Then, info templates will be searched by name as `<info_templates_path>/<service_name>/<layername>.html`.
95+
96+
Alternatively, you can specify the template in the `featureInfo` service configuration in `tenantConfig.json`, either inline or as a path:
7497
```json
7598
{
7699
"name": "featureInfo",

0 commit comments

Comments
 (0)