function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rahul Luthra 1Rahul Luthra 1 

Display announcement on home page using VF component

Hi,

I want to display an announcment flashing right to left on home page with a url embedded in the text which we will dispaly. I tried it using marquee tag but URL is not working properly and as per the blogs it seems marquee tag is discarded and no longer supported.

Please guide how can I achieve this requirement.  

TIA
Rahul
Best Answer chosen by Rahul Luthra 1
Khan AnasKhan Anas (Salesforce Developers) 
To open the link in a new tab you can use target="_blank".
 
<apex:page >   
    <marquee style="box-shadow: 0px 0px 15px black; border-radius: 5px; padding: 10px; background-color: crimson; font-weight: bolder; font-size: 14px; margin: 10px; color: white;">
        <apex:outputLink value="https://www.google.com" target="_blank" id="theLink">GOOGLE</apex:outputLink>
    </marquee>
</apex:page>

Kindly mark this as solved if the information was helpful. It will help to keep this community clean.

Regards,
Khan Anas

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi,

Greetings to you!

Create a visualforce page:
<apex:page>   
    <marquee style="box-shadow: 0px 0px 15px black; border-radius: 5px; padding: 10px; background-color: crimson; font-weight: bolder; font-size: 14px; margin: 10px; color: white;">
        <apex:outputLink value="https://www.google.com" id="theLink">GOOGLE</apex:outputLink>
    </marquee>
</apex:page>

Then create a Home Page Component for Visualforce page.

User-added image

Then edit the Home Page Layout and check the box next to 'Scrolling Banner Test' (Home page Component Name).


User-added image
Home Page:
​​​​​​​
User-added image


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Rahul Luthra 1Rahul Luthra 1
Thnx  Anas,

It worked. The challenge is – Whenever I click on link it opens in the same tab instead of new.
I tried the same with href attribute, still link opens in the same tab.

Do you have any idea, how to fix it?
 
Regards,
Rahul
 
Khan AnasKhan Anas (Salesforce Developers) 
To open the link in a new tab you can use target="_blank".
 
<apex:page >   
    <marquee style="box-shadow: 0px 0px 15px black; border-radius: 5px; padding: 10px; background-color: crimson; font-weight: bolder; font-size: 14px; margin: 10px; color: white;">
        <apex:outputLink value="https://www.google.com" target="_blank" id="theLink">GOOGLE</apex:outputLink>
    </marquee>
</apex:page>

Kindly mark this as solved if the information was helpful. It will help to keep this community clean.

Regards,
Khan Anas
This was selected as the best answer
Rahul Luthra 1Rahul Luthra 1
Awesome Anas! It worked absolutely fine. I will surely mark this as a best answer.

One last thing, same needs to replicate on service console home page. I  added a custom component with same VF page but it’s not working.

Could you please guide on this as well?

Regards,
Rahul