Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Quick Start

albertromkes edited this page Jul 31, 2011 · 5 revisions

To get quickly up and running you need to do the following:

1. Download the project and open it in Visual Studio (.NET v4.0, Entity Framework 4.1 and MVC3 must be installed)
2. Add your MVC3 webapplication to the solution
3. Place AppStart_MefContribMVC3.cs file inside your webapplication (This gets MEF up and running. Depending on the build configuration it will load the factories at application startup time)
4. Go to your controller and make sure it inherits from TridionControllerBase (inside the Tridion.Extensions.DynamicDelivery.Mvc project)
5. Implement the following ActionResult Method:


    public System.Web.Mvc.ActionResult Index(string pageUrl)
    { 
        return Page(pageUrl)
    }
    

6. Make sure you uploaded the ‘Tridion.Extensions.DynamicDelivery.Templates’ project into Tridion and that you placed the ‘Generate Dynamic Component’ Building Block on this template. Same goes for the Page Template; place ‘Generate Dynamic Page’ on this.
7. Make sure that your Component Templates and your Page Templates have a metadatafield called ‘view’ and in here you specify the name of the view to use. For example ‘Article’ for the Component Template and ‘Default’ for the Page Template.
Needless to say that you also need (Razor)views with this name in your webapplication.
8. Publish a page to the Tridion Broker Database. Remember the URL of this page, because you need to enter this URL in the browser. (Make sure your Global.asax contains a routing-rule that routes this URL to your Controller and your newly made Action on that Controller)
9. Run!

Some remarks:
1. Every project in the framework has pre- and post build events. These copy the resulting .dll file to the ‘bin’ directory of your webapplication. Make sure these events point to your webapplication!
2. We use SQLite. Sometimes you have to re-run the custom tools to create/compile the corresponding classes again.
3. Make sure your webapplication has a reference to the ‘EntityFrameWork’ assembly and to the ‘System.Data.SQLite’ and ‘System.Data.SQLite.Linq’ assemblies.
4. The buildconfiguration decides which projects get compiled. Make sure you include the right projects. E.g. the development project for debug, and the ‘real’ factories project for ‘Release’. Make sure all the right dll files end up in your ‘bin’ directory.

Clone this wiki locally