the problem I'm having is the default label is missing and when I edit the widget, I can see a GUID instead of "Map Apps" the so here is my code and then below that a screen shot:
public class MapsGroupNavigationItem : TeeuV3.CustomNavigationItem
{
int _groupId = -1;
Func<string> _getLabel;
IList<PublicApi.Entities.MapApp> _mapapps;
internal MapsGroupNavigationItem(TeeuV3.ICustomNavigationPlugin plugin, TeeuV3.ICustomNavigationItemConfiguration configuration, Guid id, int groupId, Func<string> getLabel)
{
Plugin = plugin;
Configuration = configuration;
UniqueID = id;
_groupId = groupId;
_getLabel = getLabel;
}
#region ICustomNavigationItem Members
public TeeuV3.CustomNavigationItem[] Children { get; set; }
public TeeuV3.ICustomNavigationItemConfiguration Configuration { get; private set; }
public string CssClass { get { return "mapapp"; } }
public string Label { get { return _getLabel(); } }
public TeeuV3.ICustomNavigationPlugin Plugin { get; private set; }
public Guid UniqueID { get; private set; }
public new bool IsSelected(string currentFullUrl)
{
return currentFullUrl.Contains("/mapapps/") || currentFullUrl.EndsWith("/mapapps") || currentFullUrl.EndsWith("/mapapps/");
}
public new bool IsVisible(int userId)
{
return !string.IsNullOrEmpty(Url) && PublicApi.MapApps.CanRead(_mapapps.FirstOrDefault().ApplicationId);
}
public string Url
{
get
{
// if (_groupId == -1) { return null; }
if (_mapapps != null && _mapapps.Count > 0)
{
if (_mapapps.Count == 1)
{
if (_mapapps.FirstOrDefault().Group != null && _mapapps.FirstOrDefault().Group.Url != null)// && _mapapp.SafeName != null)
{
return _mapapps.FirstOrDefault().Group.Url + "mapapps/" + _mapapps.FirstOrDefault().SafeName + "/maps/"; // InternalApi.SourceingUrlService.SourceListUrl(_groupId);
}
}
else
{
if (_mapapps.FirstOrDefault().Group != null && _mapapps.FirstOrDefault().Group.Url != null)// && _mapapp.SafeName != null)
{
return _mapapps.FirstOrDefault().Group.Url + "mapapps/";
}
}
}
// return _mapapps.FirstOrDefault().Group.Url + "mapapps/";
return "";
}
}
#endregion
}




