Umbraco
Traduction Bêta Non Officielle
Cette page a été traduite par PageTurner AI (bêta). Non approuvée officiellement par le projet. Vous avez trouvé une erreur ? Signaler un problème →
Description
Affiche la version actuelle d'Umbraco si elle est trouvée dans le répertoire de travail courant. Le segment ne s'affiche que selon la logique suivante :
-
Le dossier courant contient un dossier nommé umbraco
-
Umbraco moderne (.NET Core)
- Vérifie si le dossier courant contient un ou plusieurs fichiers .csproj
- Ouvre les fichiers XML .csproj et vérifie si Umbraco est installé en tant que PackageReference
- Lit la version installée
-
Ancienne version d'Umbraco (.NET Framework)
- Vérifie si le dossier courant contient un fichier web.config
- Ouvre le fichier XML et recherche les clés AppSettings
- Si umbraco est installé, il possède un paramètre appelé umbraco.core.configurationstatus OU umbracoConfigurationStatus
- Lit la valeur de ce paramètre pour obtenir sa version
Exemple de configuration
- json
- yaml
- toml
{
"type": "umbraco",
"background": "#ffffff",
"foreground": "#d886f1",
"style": "diamond",
"leading_diamond": "",
"trailing_diamond": "",
"template": " {{ .Version }}",
"background_templates": [
"{{ if (.Modern) }}#3544B1{{ end }}",
"{{ if not (.Modern) }}#F79C37{{ end }}"
]
}
type: umbraco
background: "#ffffff"
foreground: "#d886f1"
style: diamond
leading_diamond:
trailing_diamond:
template: {{ .Version }}
background_templates:
- "{{ if (.Modern) }}#3544B1{{ end }}"
- "{{ if not (.Modern) }}#F79C37{{ end }}"
type = "umbraco"
background = "#ffffff"
foreground = "#d886f1"
style = "diamond"
leading_diamond = ""
trailing_diamond = ""
template = " {{ .Version }}"
background_templates = [ "{{ if (.Modern) }}#3544B1{{ end }}", "{{ if not (.Modern) }}#F79C37{{ end }}" ]
Modèle (info)
modèle par défaut
{{ .Version }}
Propriétés
| Name | Type | Description |
|---|---|---|
.Modern | boolean | a boolean to determine if this is modern Umbraco V9+ using modern .NET or if it's legacy Umbraco using .NET Framework |
.Version | string | the version of umbraco found |