Pto Posted July 13, 2022 Share Posted July 13, 2022 Hello, I want to create a custom site builder and I want the icon in VistaPanel to redirect to a different link. Is it possible to do this? Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted July 13, 2022 Share Posted July 13, 2022 Yes, put your custom JavaScript to change the URL in the ad section via panel.myownfreehost.net Quote Link to comment Share on other sites More sharing options...
Pto Posted July 14, 2022 Author Share Posted July 14, 2022 like this? <script> document.getElementById("item_sitereptile").href = "https://example.com"; </script> Quote Link to comment Share on other sites More sharing options...
Wizacr Posted July 14, 2022 Share Posted July 14, 2022 Your solution will work, however, here's another solution that will modify the actual array as well as allow you to modify search text etc. <script> function fr(k, u, d, a) { for (var i=0; i < a.length; i++) { for (var x=0; x < a[i].items.length; x++) { if (a[i].items[x].feature === k) { if (d === 'url') a[i].items[x].url = u; if (d === 'itemdesc') a[i].items[x].itemdesc = u; if (d === 'searchtext') a[i].items[x].searchtext = u; } } } } fr('sitereptile', 'https://google.com', 'url', PAGE.appGroups); fr('sitereptile', 'My Builder', 'itemdesc', PAGE.appGroups); fr('sitereptile', 'build', 'searchtext', PAGE.appGroups); </script> This will change the SiteBuilder URL to "https://google.com", the text to "My Builder" and the search text to "build". I did a quick test and it worked fine. Quote Link to comment Share on other sites More sharing options...
Pto Posted July 14, 2022 Author Share Posted July 14, 2022 Thank you. Quote Link to comment Share on other sites More sharing options...
TinkerMan Posted July 14, 2022 Share Posted July 14, 2022 Thanks so much for that @Wizacr Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.