How to override widget content

Introduction

This article describes, how to override a content of a widget with example of the Welcome Widget.

1a. Overriding content for all languages

Go to your program data files in C:\ProgramData\ITSENSE\Templates\SelfService\Pages\Shared, and edit the file _WelcomeMessageBox.cshtml that is already created, to setup your custom view for all languages.

1b. Overriding content for a specific language

Same as above, go to your program data files in C:\ProgramData\ITSENSE\Templates\SelfService\Pages\Shared. Now create a file with a specific suffix with language code, just as the english one that should be already generated (_WelcomeMessageBox.en-US.cshtml). E.g.:

French: _WelcomeMessageBox.fr-FR.cshtml

German: _WelcomeMessageBox.de-DE.cshtml

2. Editing the file

Once the file is created, you can put your own HTML code that you want to be displayed there.

3. Example of override - with usage of username

Here is an example of the simpliest welcome page with a usage of username:

@model iTsense.Moving.SelfService.Features.StaticPages.Models.Views.HomePageViewModel <v-card outlined> <v-card-title> Hello @Model.UserDisplayName </v-card-title> <v-card-text class="mt-2 text-sm-body-2 text-caption grow"> Test description </v-card-text> </v-card>

that will result into:

Note that if you want to display the username of currently logged person, you need the same model declaration in line 1, and also @Model.UserDisplayName usage from line 5. Keep in mind to preserve the html structure of the v-card with v-card-title and v-card-text, so you will keep the same design.

© ITSENSE AG. Alle Rechte vorbehalten. ITSENSE und CoreOne sind eingetragene Marken der ITSENSE AG.