Hi
I have a members section. In the members section there are multiple pages (including a profile page that is visible to the public).
I have some boxes on the members bar I want visible only to the owner of the page. Could anyone point me in the right direction?
I've tied this to date, but it's hiding all the boxes even you are the owner of the page:
import wixUsers from 'wix-users';
$w.onReady(function () {
if (wixUsers.currentUser.Owner) {
$w("#box131").show();
}
else{
$w("#box131").hide();
}
});
Many thanks!
Thomas
hi everyone:
How can someone, who is now registered on the site and directed to the dynamic page, won't see himself in the repeater as well?
$w("#dynamicDataset").onReady( () => { const ownerid = $w('#dynamicDataset').getCurrentItem()._id; if (ownerid === wixUsers.currentUser.id) {
this is great now how should I continue the code if I want to filter this member from being show on the repeater?
How can someone, who is now registered on the site and directed to the dynamic page, won't see himself in the repeater as well?
Hey Thomas,
okay, I checked your post. My main problem is that I'm working with my own sign up system and my own profile pages, no the members area, so I can't try to use some code to see how solve that... I'm sorry:(
I managed to make what I was asking you this way, but it's loading quite slowly, I don't know if you did the same...
That's a part of the code paste it on the web, not the HTML:
$w.onReady(function () { sendLocations(); $w("#htmlMap").onMessage( (event) => { if(event.data === 'hello') { sendLocations(); } else { let Title = event.data; $w("#dataset1").setFilter(wixData.filter().eq("title", title)); } } ); });
Thanks :)
Thanks for your answer thomas, I will check your new post in an hour.
About Google Maps I managed to change the icon just exactly as you did (with the help of Google Developers Articles), but I couldn't change the map style, I will try later too.
What I wonder is how to do that box next to the map that answers to the clicks on the map. I tried to put an invisible input and change the text of the example for an input value and then use that input as a search bar for a repeater, but I couldn't do it that way.
Did you use a database with more information or how could you do that? (to put the houses informations next to the map and to change that information depending on what they click).
Thanks! I will tell you something about your post in a few minutes :)
Hi Thomas,
I don't code, but I kept trying and I created this code that is working for me:
(If their profile is a dynamic page, then you can do it)
$w.onReady(function () { $w("#dynamicDataset").onReady( () => { const ownerid = $w('#dynamicDataset').getCurrentItem()._id; if (ownerid === wixUsers.currentUser.id) { $w('#editbox').show(); $w('#editbutton').show(); $w('#pencil').show(); } else { $w("#editbox").hide(); $w("#editbutton").hide(); $w("#pencil").hide(); } }); });
I would appreciate your help with the map that Yisrael gave us... I saw that you did such a beautiful interactive map, but it's not working for me...
Thanks!
Hi Thomas!
Could you please share a link to your site and specify in which page you're facing an issue?
Someone from our WixCode team will inspect it and provide you with a solution.
Doron.