Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using System.Web.Routing;
- using ContentManagement;
- namespace TemplateWebApplication.Controllers
- {
- public class RapportDirektController : Controller
- {
- private ContentManager _contentManager;
- protected override void Initialize(RequestContext requestContext)
- {
- _contentManager = new ContentManager();
- base.Initialize(requestContext);
- }
- //
- // GET: /RapportDirekt/
- public ActionResult Index()
- {
- ContentItem titleContent = _contentManager.GetSingle("//rapportdirekt/title");
- ViewBag.Title = titleContent.Value;
- ContentItem headerContent = _contentManager.GetSingle("//rapportdirekt/header");
- ViewBag.Header = headerContent.Value;
- ContentItem mainBodyContent = _contentManager.GetSingle("//rapportdirekt/mainbody");
- ViewBag.MainBody = mainBodyContent.Value;
- return View();
- }
- }
- }
Add Comment
Please, Sign In to add comment