@* Views/Shared/_AdUnit.cshtml *@ @{ var position = ViewBag.AdPosition?.ToString() ?? "default"; var slotId = ViewBag.AdSlotId?.ToString() ?? "default-slot"; var adFormat = ViewBag.AdFormat?.ToString() ?? "auto"; var adSize = ViewBag.AdSize?.ToString() ?? ""; var publisherId = ViewBag.GoogleAdsPublisher?.ToString() ?? "pub-3475956393038764"; var isEnabled = ViewBag.GoogleAdsEnabled ?? true; var cssClass = ViewBag.AdCssClass?.ToString() ?? "ad-container"; var isSticky = ViewBag.IsSticky ?? false; var showOnMobile = ViewBag.ShowOnMobile ?? true; var showOnDesktop = ViewBag.ShowOnDesktop ?? true; } @if (isEnabled && !string.IsNullOrEmpty(publisherId) && publisherId != "pub-3475956393038764") {
@if (ViewBag.ShowAdLabel == true) { Publicidade }
} else if (ViewBag.ShowPlaceholder == true) {
Anúncio: @position
}