public ActionResult Index()
        {
            ParitalWidgetPageWidgetActionViewModel model = new ParitalWidgetPageWidgetActionViewModel();
            var widgetProperties = ComponentPropertiesRetriever.Retrieve <PartialWidgetPageWidgetModel>();

            if (widgetProperties == null || (widgetProperties.Path == null && widgetProperties.Page == null && widgetProperties.CustomUrl == null))
            {
                model.Render = false;
            }
            else
            {
                model.Render = true;
                var Properties = widgetProperties;
                if (Properties.RenderMode.Equals(PartialWidgetPageWidgetModel._RenderMode_Ajax))
                {
                    model.RenderMode = PartialWidgetPageWidgetRenderMode.Ajax;
                    // Get path
                    if (!string.IsNullOrWhiteSpace(Properties.CustomUrl))
                    {
                        model.AjaxUrl = Properties.CustomUrl;
                    }
                    else
                    {
                        TreeNode Page = GetPage(Properties, false);
                        if (Page == null)
                        {
                            model.Render = false;
                            model.Error  = "Could not locate Page, please check configuration";
                            EventLogWriter.WriteLog(new EventLogData(EventTypeEnum.Warning, "PartialWidgetPageWidget", "PAGENOTFOUND")
                            {
                                EventDescription = "Could not find Page from the configuration of the Parital Widget Page Widget, located on page: " + PageDataContextRetriever.Retrieve <TreeNode>().Page.NodeAlias
                            });
                        }
                        else
                        {
                            // get Relative Url
                            model.AjaxUrl = DocumentURLProvider.GetUrl(Page);
                        }
                    }
                }
                else if (Properties.RenderMode.Equals(PartialWidgetPageWidgetModel._RenderMode_Server))
                {
                    model.RenderMode = PartialWidgetPageWidgetRenderMode.ServerSide;
                    TreeNode Page = GetPage(Properties, false);
                    if (Page == null)
                    {
                        model.Render = false;
                        model.Error  = "Could not locate Page, please check configuration";
                        EventLogWriter.WriteLog(new EventLogData(EventTypeEnum.Warning, "PartialWidgetPageWidget", "PAGENOTFOUND")
                        {
                            EventDescription = "Could not find Page from the configuration of the Parital Widget Page Widget, located on page: " + PageDataContextRetriever.Retrieve <TreeNode>().Page.NodeAlias
                        });
                    }
                    else
                    {
                        // get DocumentID and RenderClass
                        model.Renderer   = PartialWidgetRenderingRetriever.GetRenderingControllerAction(Page.ClassName);
                        model.DocumentID = Page.DocumentID;
                    }
                }
                else
                {
                    model.Render = false;
                }
            }

            return(View(_VIEWPATH, model));
        }