コード例 #1
0
        public ActionResult Results()
        {
            const string assetsPrefix = "carsforsale.results";

            var metadata = MetadataService.GetMetadataForPage(HttpContext);

            var viewModel = new ResultsViewModel(assetsPrefix, metadata)
            {
                InlineHeadScript = AssetService.GetInlineHeadScript(),
                InlineHeadStyles = AssetService.GetInlineHeadStyles(assetsPrefix),
                AdvertMeta       = new AdvertMeta
                {
                    delayAdsLoading = true
                },
                TrackMeta = new TrackMeta(metadata)
                {
                    DelayPageviewTracking = true
                },
                FirstLoad = true
            };

            //We need to register pageJson.inventory for current version of lead for popup on results page.
            // Values will be populated on click event
            viewModel.RegisterPageJson("{}", "ABT.pageJson.inventory");
            return(View("Results", viewModel));
        }
コード例 #2
0
        public ActionResult Results()
        {
            const string assetsPrefix = "comparecars.results";

            var metadata = MetadataService.GetMetadataForPage(HttpContext);

            var viewModel = new ResultsViewModel(assetsPrefix, metadata)
            {
                InlineHeadScript = AssetService.GetInlineHeadScript(),
                InlineHeadStyles = AssetService.GetInlineHeadStyles(assetsPrefix)
            };

            var leadformJsonStr = JsonConvert.SerializeObject(new
                                                              { quoteButtonSelected = false, year = "", make = "", supermodel = "", trim = "" });

            viewModel.RegisterPageJson(leadformJsonStr, "ABT.pageJson.getaquote");
            return(View("Results", viewModel));
        }