/// <summary>
        /// Binds the model to a value by using the specified controller context and binding context.
        /// </summary>
        /// <returns>
        /// The bound value.
        /// </returns>
        /// <param name="controllerContext">The controller context.</param><param name="bindingContext">The binding context.</param>
        public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
        {
            object model;

            if (controllerContext.RouteData.DataTokens.TryGetValue(Core.Constants.Web.UmbracoDataToken, out model) == false)
            {
                return(null);
            }

            //This model binder deals with IRenderModel and IPublishedContent by extracting the model from the route's
            // datatokens. This data token is set in 2 places: RenderRouteHandler, UmbracoVirtualNodeRouteHandler
            // and both always set the model to an instance of `RenderModel`. So if this isn't an instance of IRenderModel then
            // we need to let the DefaultModelBinder deal with the logic.
            var renderModel = model as IRenderModel;

            if (renderModel == null)
            {
                model = base.BindModel(controllerContext, bindingContext);
                if (model == null)
                {
                    return(null);
                }
            }

            //if for any reason the model is not either IRenderModel or IPublishedContent, then we return since those are the only
            // types this binder is dealing with.
            if ((model is IRenderModel) == false && (model is IPublishedContent) == false)
            {
                return(null);
            }

            //default culture
            var culture = CultureInfo.CurrentCulture;

            var umbracoContext = controllerContext.GetUmbracoContext()
                                 ?? UmbracoContext.Current;

            if (umbracoContext != null && umbracoContext.PublishedContentRequest != null)
            {
                culture = umbracoContext.PublishedContentRequest.Culture;
            }

            return(BindModel(model, bindingContext.ModelType, culture));
        }