Change image in block based on logged in user tag/custom fie

Posted by Community Admin on 03-Aug-2018 11:27

Change image in block based on logged in user tag/custom field

All Replies

Posted by Community Admin on 23-Mar-2015 00:00

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

Posted by Community Admin on 23-Mar-2015 00:00

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

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed