Example #1
0
        public ActionResult Index(BookmarksPage currentPage)
        {
            var model = new BookmarksViewModel(currentPage)
            {
                Bookmarks      = _bookmarksService.Get(),
                CurrentContent = currentPage
            };

            return(View(model));
        }
Example #2
0
        protected virtual bool IsBookmarked(IContent currentContent)
        {
            var isBookmarked = false;
            var bookmarks    = _bookmarksService.Get();

            if (bookmarks != null && bookmarks.Any() && bookmarks.FirstOrDefault().ContentGuid != null && currentContent != null)
            {
                isBookmarked = bookmarks.FirstOrDefault(x => x.ContentGuid == currentContent.ContentGuid) != null;
            }

            return(isBookmarked);
        }
        public async Task <ActionResult> Index(BookmarksPage currentPage)
        {
            await _trackingService.PageViewed(HttpContext, currentPage);

            var model = new BookmarksViewModel(currentPage)
            {
                Bookmarks      = _bookmarksService.Get(),
                CurrentContent = currentPage
            };

            return(View(model));
        }