public SeoMetaDataViewModel GetViewModelFromSeoSettings(ISeoComposition composition)
        {
            var settings = composition.SeoSettings;
            var Title    = "";

            if (settings == null)
            {
                return(GetViewModel(composition));
            }

            if (string.IsNullOrWhiteSpace(settings.Title) == false)
            {
                Title = settings.Title;
            }
            else if (composition.Name.ToLower() == "home")
            {
                Title = "JNCC - Adviser to Government on Nature Conservation";
            }
            else
            {
                Title = composition.Name + " | JNCC - Adviser to Government on Nature Conservation";
            }

            return(new SeoMetaDataViewModel
            {
                Title = Title,
                Description = settings.Description,
                Keywords = settings.Keywords,
                NoIndex = composition.NoIndex,
            });
        }
Beispiel #2
0
 /// <summary>Static getter for SEO Settings</summary>
 public static SEOChecker.MVC.MetaData GetSeoSettings(ISeoComposition that)
 {
     return(that.GetPropertyValue <SEOChecker.MVC.MetaData>("seoSettings"));
 }
Beispiel #3
0
 /// <summary>Static getter for NoIndex</summary>
 public static bool GetNoIndex(ISeoComposition that)
 {
     return(that.GetPropertyValue <bool>("noIndex"));
 }