Why did you not use pagereference to get the state variable from the URL? That is the officially supported method right.? Instead of using the Window.Location..
Correct u can also use currentPageRenfrence using below code to get caseRecordId from url👇👇👇👇👇 import { CurrentPageReference } from 'lightning/navigation'; currentPageReference = null; @wire(CurrentPageReference) getStateParameters(currentPageReference) { if (currentPageReference) { this.caseId = currentPageReference.state.caseRecordId; } }
Thanks for your detail video. I have a requirement, after logging need to redirect to a custom page of sites. Already implemented using navigation service but facing the issue instead of opening in a current window, its opening a new window. Could you please suggest?
I am new to experience cloud and got a requirement to navigate to another page when community users click on a display card like yours. I was wondering if there is an out of the box component or not and landed up here. Although, I am not a developer, I really liked the way you explained everything and also trying to help others by sharing codes in comments as well. Thank you so much.
@Salesforce Noob Can you please guide how we can navigate from one page to another in LWR sites? I am facing error - lwr_bootstrap_locker: Routing error: A URL cannot be created to navigate to route
Already created playlist on Experience cloud which will consist videos about making public sites - ua-cam.com/play/PLVILwsgb1PonFOtSYoLCrxQfJNTJPBxY0.html&si=xeFVII-DsI1esYyM
Hi! I followed your video even though I do not speak Hindi but I am not able to open a community page that I created :( When I click my LWC button, it shows a pop up "Page doesn't exist. Enter a valid URL and try again". My button component has the same NavigationMixin.Navigate as the one in your video to open community page. Can you help me with my error?
I want to redirect to home page using dynamic url. I have replaced name attribute with 'home' api name. Seems not working. Please guide if i need to use any state properties
Hi, if u want to navigate on home page in experience cloud,then u can use the below code :- JS code:- import { LightningElement,wire } from 'lwc'; import { NavigationMixin } from 'lightning/navigation'; export default class ClassName extends NavigationMixin(LightningElement) { navigationToHomePage(){ // Navigate to the About page this[NavigationMixin.Navigate]({ type: 'comm__namedPage', attributes: { name: 'Home' } }); } }
Why did you not use pagereference to get the state variable from the URL? That is the officially supported method right.? Instead of using the Window.Location..
Correct u can also use currentPageRenfrence using below code to get caseRecordId from url👇👇👇👇👇
import { CurrentPageReference } from 'lightning/navigation';
currentPageReference = null;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
if (currentPageReference) {
this.caseId = currentPageReference.state.caseRecordId;
}
}
Thanks for your detail video. I have a requirement, after logging need to redirect to a custom page of sites. Already implemented using navigation service but facing the issue instead of opening in a current window, its opening a new window. Could you please suggest?
I am new to experience cloud and got a requirement to navigate to another page when community users click on a display card like yours. I was wondering if there is an out of the box component or not and landed up here.
Although, I am not a developer, I really liked the way you explained everything and also trying to help others by sharing codes in comments as well. Thank you so much.
Exactly what I was needing. You put me out of my problem. Great video
Glad to hear that🤩🤘
@Salesforce Noob Can you please guide how we can navigate from one page to another in LWR sites? I am facing error - lwr_bootstrap_locker: Routing error: A URL cannot be created to navigate to route
Can we redirect any url when click on the community tab in navigation menu
Yes you can learn that from this video - ua-cam.com/video/WT_LLDoxjAU/v-deo.htmlsi=2qNrlZP9flVxZdJH
bhai mujhe state me recordID pass karni hain dusre community page pe aur use variable me store karna hain
Hello,
How we can append recordId dynamically to the Site URL
that's what i explained in this video
Please create a complete playlist on experience cloud creating public website.
Already created playlist on Experience cloud which will consist videos about making public sites - ua-cam.com/play/PLVILwsgb1PonFOtSYoLCrxQfJNTJPBxY0.html&si=xeFVII-DsI1esYyM
Hi! I followed your video even though I do not speak Hindi but I am not able to open a community page that I created :( When I click my LWC button, it shows a pop up
"Page doesn't exist. Enter a valid URL and try again". My button component has the same NavigationMixin.Navigate as the one in your video to open community page. Can you help me with my error?
Hi,
You have to drop that lwc button on Salesforce community page and then give the reference of another page where u want to redirect
Banao Bhai detailed videos playlist
I want to redirect to home page using dynamic url. I have replaced name attribute with 'home' api name. Seems not working. Please guide if i need to use any state properties
Hi,
if u want to navigate on home page in experience cloud,then u can use the below code :-
JS code:-
import { LightningElement,wire } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
export default class ClassName extends NavigationMixin(LightningElement) {
navigationToHomePage(){
// Navigate to the About page
this[NavigationMixin.Navigate]({
type: 'comm__namedPage',
attributes: {
name: 'Home'
}
});
}
}
Very informative 🙏🙏👍
Please make videos on experience cloud too
yes, i want to learn Experience clould how to create a website
can you provide GitHub repository
Please page pagination video in lwc and also with and without pdf pagination in that
Sure bro... I'll upload one on that
Bro I am watting next video please upload or any update
It will be uploaded soon on creating, updating and deleting records in salesforce with and without calling apex from lwc🤘
Please create a complete playlist on experience cloud creating public website
Sure 👍