Storefront - How to add customized message in the Storefront Web Page

book

Article ID: CTX695186

calendar_today

Updated On:

Description

Here is an example, customer can set it according to their needs.

1. Find the Store file path,

  • C:\inetpub\wwwroot\Citrix\YourStoreWeb\custom
  • C:\inetpub\wwwroot\Citrix\YourStoreWeb\customweb

2. Back up the files "style.css" and "script.js". 

3. Add the following codes in the file of "script.js":

var fetchedContent=false;

function doFetchContent(callback) {
    if(!fetchedContent) {
        fetchedContent = true;
        // Request status.txt and if successful, update the banner
        CTXS.ExtensionAPI.proxyRequest({
        url: "customweb/status.txt",
        success: (txt) => {document.getElementById("customTop").innerHTML = txt}});
    }
    callback();
}
CTXS.Extensions.beforeDisplayHomeScreen = doFetchContent;

4. Add the following codes in file of "Style.css":

#customTop
{
    text-align:center;
    background-color: yellow;
    font-size:30px;
    height: 40px;
}

.scroll-text {
            width: 100%;
            overflow: hidden;
            white-space: nowrap;
            box-sizing: border-box;
        }

        .scroll-text span {
            display: inline-block;
            padding-left: 100%;
            animation: scroll-left 15s linear infinite;
        }

        @keyframes scroll-left {
            from {
                transform: translateX(-100%);
            }
            to {
                transform: translateX(0%);
            }
        }

5. Create a file "status.txt" under the pat "C:\inetpub\wwwroot\Citrix\YourStoreWeb\customweb, add the following codes.

<div class="scroll-text">
        <span>This is a scrolling text</span>
    </div>

6. Save all files, logoff and logon the Storefront web page.

Issue/Introduction

Customer sometimes needs to add customized message in the Storefront web page.

This article describes how to add the message via modifying the CSS file.