I need to get the page name and set the name as the text of a custom element. For Eg, I have 5 pages in the menu, Home, About, Contact, Blog and Shop, I need to get the active page, for eg : Home and put this in the custom element.
I tried getting it by
let myTitle = $w("#myPage").title; // "Page Title"
but did not work. I do not know what to put instead of " #myPage ". Please help me.