@using MrCMS.Website
@model MrCMS.Web.Apps.Core.Models.Navigation.NavigationRecord
@{
    var currentPage = CurrentRequestData.CurrentPage;
    var activePages = currentPage.ActivePages.Select(webpage => "/" + webpage.LiveUrlSegment).ToList();
}
 <ul class="dropdown-menu">
    @foreach (var record in Model.Children)
    {
        <li class="@(activePages.Contains(record.Url.ToString(), StringComparer.OrdinalIgnoreCase) ? "active" : "")">
            <a href="@record.Url">@record.Text</a>
        </li>
    }
    </ul>