Exemple #1
0
        /// <summary>
        /// Gets the SEO list for the site tree with the given id.
        /// </summary>
        /// <param name="id">The internal id of the site.</param>
        public ActionResult Seo(string id)
        {
            try {
                var param = Piranha.Models.SysParam.GetByName("SITEMAP_EXPANDED_LEVELS");
                ViewBag.Levels = param != null?Convert.ToInt32(param.Value) : 0;

                ViewBag.Expanded = Guid.Empty;
            } catch {
                ViewBag.Levels   = 0;
                ViewBag.Expanded = Guid.Empty;
            }
            var m = ListModel.GetSEO(id);

            ViewBag.Title = @Piranha.Resources.Page.ListTitle;

            // Executes the page list loaded hook, if registered
            if (Hooks.Manager.Page.Model.OnListLoad != null)
            {
                Hooks.Manager.Page.Model.OnListLoad(this, WebPages.Manager.GetActiveMenuItem(), m);
            }

            return(View(@"~/Areas/Manager/Views/Page/Index.cshtml", m));
        }