Change image in block based on logged in user tag/custom field
Hi
Could someone tell me how I can have an image block (for example) that changes the image based on the user logged in, and the category/tag they have assigned
EG
2 users - custom field for home town, one user is set as OXFORD the other LONDON
Image block on a page, shows the "Oxford" image when Oxford user is logged in, and the "London" image when London user is logged in
If no user logged in, it shows another image
I am not good with code, so if there is a way to do this without much code / its easy to understand I would be very grateful
thanks
James
Hi James,
What you would typically do is Get the currently logged in user, query data from his profile (e.g. the location he has set in his profile) and execute your logic against that.
Here's our documentation article on how to get the currently logged in user and any properties that are related to him.
Please let me know if that helps of you need more info!
Regards,
Grisha 'Greg' Karanikolov
Telerik