Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

How can I change the color of the "register now" button on an event website?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Where/How can I customize the colors of my marketing event websites?

button.jpg

  • Suggested answer
    cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: How can I change the color of the "register now" button on an event website?

    Hi Sebastian,

    We need to download event website files to add customization, then deploy the customization to Event Portal using an automation script inside the folder.

    You can refer to following community blog posts to learn about how to run event website on local machine and do deployment.

    https://community.dynamics.com/crm/b/misscrm360exploration/posts/tutorial-how-to-build-deploy-and-test-locally-dynamics-365-portal-or-dynamics-marketing-event-portal-and-connect-it-to-your-dynamics-365-instance-live-1670080455(The author also posted links of documentation tutorial.)

    https://community.dynamics.com/crm/b/misscrm360exploration/posts/tutorial-customize-and-deploy-dynamics-365-marketing-event-management-or-other-portal

    Here is my method to customize color of the button:

    1. Create a property "colors" to environment.ts file(src\environments), use child property(e.g: color_option) to represent the specific color:

    (Comment some color codes as other options if necessary.)

    pastedimage1611727868611v1.png

    colors : {
        color_option: "#68BC49"
        // color_option1: "#006ADB",
        // color_option2: "#6BCDFD",
        // color_option3: "#009DAC",
        // color_option4: "#FF9C01",
        // color_option5: "#68BC49"
    },

    2. Open event.component.html(src\app\components\event), search for the button element, bind [ngStyle="getColor()" directive to both of the buttons.

    (We can see there are two register now buttons, if sessions are not enabled for event, then the top button will be used. If sessions are enabled, the bottom one will be used.)

    (getColor is function to read color property of environment.ts.)

    e1.JPG

    3. Open event.component.ts located in the same folder as the html, declare a new function getColor with following code.

    public getColor() {
        return {backgroundColor: environment.colors.color_option, borderColor: environment.colors.color_option}
    }

    pastedimage1611728567699v2.png

    After above steps we only need to change value of the child property to change color of the button.

    Test 1

    pastedimage1611728709794v3.png

    pastedimage1611728739167v4.png

    Test 2

    pastedimage1611728792993v5.png

    pastedimage1611728826727v6.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans