I have a SharePoint site that contains a series of site pages for users across many geograpical areas. Users will open these site pages for the specific areas in order to collaberate. Site pages are accessed via the home page of the site, where there is a 'tile' for each geographical area with an embedded hyperlink
What I would like to do is control what 'tiles' the users can see based off values in a SharePoint list.
I currently have a web part that contains a tile per geographical area (with the hyperlink already embedded in it), where the 'style' has been set to "Display: none". Here is an example:
<a title="Click here to view Area 1" href="/sites/MySite/SitePages/Area1.aspx"> img id ="Area1" img src="/sites/MySite/SiteAssets/Area1.png" data-themekey="#" style="display: none;"/></a>
I have a SharePoint list called lstAccess which contains a list of email addresses and the areas they have access to. E.g.:
Name Email Area User 1 firstname.lastname@example.org Area 1 User 1 email@example.com Area 3 User 2 firstname.lastname@example.org Area 2
So my desired end result is, when User 1 opens the SharePoint site, he or she sees the 'Tile' for Areas 1 & 3.
I'm having difficulty with querying my lstAccess to get these desired values. I am currently using
SPServices.SPGetCurrentUser() to grab the person currently signed in (which appears to work), but I'm stuck as to where to go from here.
Has anyone tried something similar before? I appreciate this is a non-standard use for SharePoint (a tool for collaberation and not restriction!)