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
User SethUser Seth 

How to add/create a custom buttons in Experience Cloud Site

My Requirement I want to create a Custom button so  When I click That button it will redirect me to the External Link
PriyaPriya (Salesforce Developers) 

Hi ,

Kindly refer the example which exactly matches your requirement :-

https://salesforce.stackexchange.com/questions/279061/redirect-to-a-url-on-a-click-of-custom-button-through-if-condition


 

Kindly mark it as the best answer if it works for you.

 

Thanks & Regards,

Priya Ranjan

 

User SethUser Seth
Hi Priya 
I want create two simple buttons that will redirect to external url
Simple Html Buttons that will redirect to these websites
Example Facebook and Youtube
dqwhk ndwjkqdqwhk ndwjkq
There are some very interesting ways to make this type of button you can check here this page (https://myluxuryscent.com/) for most valid example and if this button is same then just inform me I will share the code details.
PriyaPriya (Salesforce Developers) 
Hi,

If that is the case then you need use the PageReference method in Apex class and call tha method on button click. Below is the sample :- 

Syntax : 
PageReference pageRef = new PageReference('http://www.google.com');


Guide :- https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_system_pagereference.htm

Kindly mark it as the best answer if it works for you.
 
Thanks & Regards,
Priya Ranjan