2023-05-03 12:43:20 -07:00
|
|
|
---
|
|
|
|
id: sitecore
|
|
|
|
title: Sitecore
|
|
|
|
sidebar_label: Sitecore
|
|
|
|
---
|
|
|
|
|
|
|
|
## What
|
|
|
|
|
2024-07-05 03:21:58 -07:00
|
|
|
Display current [Sitecore] environment. Will not be active when sitecore.json and user.json don't exist.
|
2023-05-03 12:43:20 -07:00
|
|
|
|
|
|
|
## Sample Configuration
|
|
|
|
|
2023-06-07 22:40:05 -07:00
|
|
|
```json
|
|
|
|
{
|
|
|
|
"type": "sitecore",
|
|
|
|
"style": "plain",
|
|
|
|
"foreground": "#000000",
|
|
|
|
"background": "#FFFFFF",
|
|
|
|
"template": "Env: {{ .EndpointName }}{{ if .CmHost }} CM: {{ .CmHost }}{{ end }}"
|
|
|
|
}
|
|
|
|
```
|
2023-05-03 12:43:20 -07:00
|
|
|
|
|
|
|
## Properties
|
|
|
|
|
2024-04-04 14:20:48 -07:00
|
|
|
| Name | Type | Default | Description |
|
|
|
|
| ----------------- | :-------: | :-----: | ------------------------------------------------------------------------------- |
|
|
|
|
| `display_default` | `boolean` | `true` | display the segment or not when the Sitecore environment name matches `default` |
|
2023-05-03 12:43:20 -07:00
|
|
|
|
|
|
|
## Template ([info][templates])
|
|
|
|
|
|
|
|
:::note default template
|
|
|
|
|
|
|
|
```template
|
2023-06-07 22:40:05 -07:00
|
|
|
{{ .EndpointName }} {{ if .CmHost }}({{ .CmHost }}){{ end }}
|
2023-05-03 12:43:20 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
2023-06-07 22:40:05 -07:00
|
|
|
## Properties
|
2023-05-03 12:43:20 -07:00
|
|
|
|
2023-06-07 22:40:05 -07:00
|
|
|
| Name | Type | Description |
|
|
|
|
| -------------- | -------- | ---------------------------------------- |
|
|
|
|
| `EndpointName` | `string` | name of the current Sitecore environment |
|
|
|
|
| `CmHost` | `string` | host of the current Sitecore environment |
|
2024-07-05 03:21:58 -07:00
|
|
|
|
|
|
|
[go-text-template]: https://golang.org/pkg/text/template/
|
|
|
|
[templates]: /docs/configuration/templates
|
|
|
|
[Sitecore]: https://www.sitecore.com/
|