Skip to main content

Posts

Showing posts with the label MVC4

Navigation in DD4T

There always been a question on What is the best approach for building navigation with DD4T and ASP.NET MVC? Answer is: There is TridionSiteMapProvider as part of the DD4T.Mvc project, which can be used out of the box. The  DD4T.Examples.Templates project also have a example on how Sitemap can be generated from the template ( TBB ) Many organization will have different kinds of navigation structure, It can be from very simple structure or it can be a heavily complex in nature. In this article you can see how the default SitemapProvider can be used and how we could customize to achieve complex Navigations like Megamenu or similar using TridionSiteMapProvider. Setting up the default TridionSiteMapProvider The only configuration you would need to do in web.config is set the your default sitemap provider is as below. <system.web> <siteMap defaultProvider= "TridionSiteMapProvider" enabled= "true" > <providers> <clear/> ...

ASP.MVC in Umbraco 6

Umbraco 6 brings new lots of improvements for developers, new datalayer, new API’s and complete support for Asp.net MVC 4. This means developers will have greater control, simpler code and higher productivity when developing with Umbraco. As the umbraco blog says, in Umbraco 6 we have: MVC support,  Native Razor support Strongly typed views   Building custom controllers Whole new shiny API Customizing routes. and many more.. Download the latest version 6.0.0. from http://umbraco.codeplex.com/releases . Create a blank MVC4 Application , and add the downloaded files to the newly created website. so that it will make the debugging easier. OR run NuGet Package Manager Command :  PM> Install-Package UmbracoCms Now we can enable the mvc in ~/config/umbracoSettings.config  <defaultRenderingEngine>Mvc</defaultRenderingEngine> by default it will be web forms change it to Mvc. Add another blank MVC4 project to the exist...