-
I can enable a feature with: How do I check the existence? Thank you |
Beta Was this translation helpful? Give feedback.
Answered by
jansenbe
Feb 13, 2024
Replies: 1 comment
-
Ensure the features are loaded (e.g. // Was the communication site feature enabled?
var communicationSiteFeature = Guid.Parse("f39dad74-ea79-46ef-9ef7-fe2370754f6f");
var feature = context.Site.Features.AsRequested().FirstOrDefault(p => p.DefinitionId == communicationSiteFeature);
bool enabled = feature != null; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Ofer-Gal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ensure the features are loaded (e.g.
await context.Site.EnsurePropertiesAsync(p => p.Features);
) and then verify if the feature you need was there: