Error compiling template "Designs/star360/_parsed/News.parsed.cshtml"
Line 309: The name 'GeneralSettings' does not exist in the current context

1 @using System 2 @using System.Web 3 4 @using System.Text.RegularExpressions 5 @using System.Web 6 7 8 @functions{ 9 public class WrapMethods 10 { 11 //Gets the contrasting color 12 public static string getContrastYIQ(string hexcolor) 13 { 14 if (hexcolor != "") 15 { 16 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); 17 18 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); 19 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); 20 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); 21 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; 22 23 if (yiq >= 128) 24 { 25 return "black"; 26 } 27 else 28 { 29 return "white"; 30 } 31 } 32 else 33 { 34 return "black"; 35 } 36 } 37 38 39 //Truncate text 40 public static string Truncate (string value, int count, bool strip=true) 41 { 42 if (strip == true){ 43 value = StripHtmlTagByCharArray(value); 44 } 45 46 if (value.Length > count) 47 { 48 value = value.Substring(0, count - 1) + "..."; 49 } 50 51 return value; 52 } 53 54 55 //Strip text from HTML 56 public static string StripHtmlTagByCharArray(string htmlString) 57 { 58 char[] array = new char[htmlString.Length]; 59 int arrayIndex = 0; 60 bool inside = false; 61 62 for (int i = 0; i < htmlString.Length; i++) 63 { 64 char let = htmlString[i]; 65 if (let == '<') 66 { 67 inside = true; 68 continue; 69 } 70 if (let == '>') 71 { 72 inside = false; 73 continue; 74 } 75 if (!inside) 76 { 77 array[arrayIndex] = let; 78 arrayIndex++; 79 } 80 } 81 return new string(array, 0, arrayIndex); 82 } 83 84 //Make the correct count of columns 85 public static string ColumnMaker(int Col, string ScreenSize) 86 { 87 string Columns = ""; 88 89 switch (Col) 90 { 91 case 1: 92 Columns = "col-"+ScreenSize+"-12"; 93 break; 94 95 case 2: 96 Columns = "col-"+ScreenSize+"-6"; 97 break; 98 99 case 3: 100 Columns = "col-"+ScreenSize+"-4"; 101 break; 102 103 case 4: 104 Columns = "col-"+ScreenSize+"-3"; 105 break; 106 107 default: 108 Columns = "col-"+ScreenSize+"-3"; 109 break; 110 } 111 112 return Columns; 113 } 114 115 116 private string Custom(string firstoption, string secondoption) 117 { 118 if (firstoption == "custom") 119 { 120 return secondoption; 121 } 122 else 123 { 124 return firstoption; 125 } 126 } 127 } 128 } 129 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 130 <html xmlns="http://www.w3.org/1999/xhtml"> 131 <head> 132 <!-- Meta Tags --> 133 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 134 <meta name="viewport" content="width=device-width, initial-scale=1"> 135 <!-- Variables --> 136 @{ 137 var attrValue = ""; 138 string MetaDescription = GetString("Meta.Description"); 139 string MetaKeywords = GetString("Meta.Keywords"); 140 var favicon = @GetString("Item.Area.Favicon"); 141 string cssAutoPath = "/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css?t=@areaUpdated.Ticks"; 142 string currentpageid = GetString("DwPageID"); 143 string firstpageid = GetString("DwAreaFirstActivePageID"); 144 string loginpageid = "8482"; 145 string searchplaceholder = Translate("Search", "Search"); 146 string IPAddress = HttpContext.Current.Request.Params["HTTP_CLIENT_IP"] ?? HttpContext.Current.Request.UserHostAddress; 147 } 148 @{ 149 150 string[] Country = new string[12]; 151 string[] Language = new string[12]; 152 153 var sitesql = "SELECT TOP 20 AreaID,AreaName,AreaDomain,AreaLanguage,AreaCulture,AreaActive FROM Area where Area.AreaActive<>0"; 154 using (var reader = Dynamicweb.Database.CreateDataReader(sitesql)) { 155 String Culture; 156 157 int wordcount = 0; 158 159 while (reader.Read()) { 160 Culture=reader["AreaCulture"].ToString(); 161 string[] words = Culture.Split('-'); 162 if (!Language.Contains(words[0].ToString())) 163 { 164 Language[wordcount]= words[0].ToString(); 165 } 166 if(!Country.Contains(words[1].ToString().ToLower())) 167 { 168 Country[wordcount]=words[1].ToString().ToLower(); 169 } 170 wordcount=wordcount+1; 171 } 172 } 173 } 174 175 176 <title>@GetValue("Title")</title> 177 @GetValue("MetaTags") 178 @GetValue("CopyRightNotice") 179 180 181 182 <meta name="robots" content="index, follow"> 183 <link href="@favicon" rel="icon" type="image/png"> 184 <link rel="stylesheet" href="/Files/Templates/Designs/star360/assets/styles/bootstrap.min.css" type="text/css"> 185 <link rel="stylesheet" href="/Files/Templates/Designs/star360/assets/styles/font-awesome.min.css" type="text/css"> 186 <link rel="stylesheet" href="/Files/Templates/Designs/star360/assets/styles/jquery.fancybox.min.css" media="screen"> 187 <!-- Scripts --> 188 <script src="/Files/Templates/Designs/star360/scripts/jquery-1.11.3.min.js"></script> 189 <script src="/Files/Templates/Designs/star360/scripts/jquery-migrate-1.2.1.min.js"></script> 190 <script src="/Files/Templates/Designs/star360/scripts/jquery-ui.min.js"></script> 191 <script src="/Files/Templates/Designs/star360/scripts/selectboxit.min.js"></script> 192 <script src="/Files/Templates/Designs/star360/scripts/cycle2.min.js"></script> 193 <script src="/Files/Templates/Designs/star360/scripts/magnific-popup.min.js"></script> 194 <script src="/Files/Templates/Designs/star360/scripts/mcustom-scrollbar.min.js"></script> 195 <script src="/Files/Templates/Designs/star360/scripts/modernizr.js"></script> 196 <link href="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/css/jasny-bootstrap.min.css" rel="stylesheet" type="text/css" media="screen"> 197 <!-- Stylesheets --> 198 <link href="/Files/Templates/Designs/star360/assets/styles/normalize.css" rel="stylesheet" type="text/css" media="all"> 199 <link href="/Files/Templates/Designs/star360/assets/styles/selectboxit.css" rel="stylesheet" type="text/css" media="all"> 200 <link href="/Files/Templates/Designs/star360/assets/styles/magnific-popup.css" rel="stylesheet" type="text/css" media="all"> 201 <link href="/Files/Templates/Designs/star360/assets/styles/mcustom-scrollbar.css" rel="stylesheet" type="text/css" media="all"> 202 <link href="/Files/Templates/Designs/star360/assets/style.css" rel="stylesheet" type="text/css" media="all"> 203 204 <script src="/Files/Templates/Designs/star360/scripts/function.js"></script> 205 206 <!-- Title --> 207 <title>Star 360 Holdings</title> 208 209 @{ 210 string googleTrackingId = GetString("Item.Area.Google_Analytic_ID"); 211 212 if (!string.IsNullOrWhiteSpace(googleTrackingId)) 213 { 214 <script type="text/javascript"> 215 var _gaq = [['_setAccount', '@googleTrackingId'], ['_trackPageview']]; 216 (function(d, t) { 217 var g = d.createElement(t), 218 s = d.getElementsByTagName(t)[0]; 219 g.async = true; 220 g.src = '//www.google-analytics.com/ga.js'; 221 s.parentNode.insertBefore(g, s); 222 })(document, 'script'); 223 </script> 224 } 225 226 } 227 @GetValue("Stylesheets") 228 @GetValue("Javascripts") 229 </head> 230 231 <body> 232 233 <!-- Header --> 234 @{ 235 string searchpage=GetString("Item.Area.SearchPage"); 236 } 237 <header> 238 <div id="header-container" class="clearfix"> 239 <div id="search" class="icon border"> 240 <form id="searchForm1" method="get" action="Default.aspx"> 241 <input type="hidden" name="ID" value="@searchpage"> 242 <input type="search" name="q" tabindex="1" autocomplete="off" placeholder="@searchplaceholder"> 243 <input type="submit" value="Search"> 244 </form> 245 </div> 246 <div id="language" class="icon icon-globe"> 247 <select id="language" onchange="country(0,this.value)"> <!-- --> 248 @{ 249 250 foreach (var lang in @Language) 251 { 252 if(!string.IsNullOrWhiteSpace(lang)) 253 { 254 <option id="@lang" value="@lang">@lang.ToUpper()</option> 255 } 256 } 257 } 258 </select> 259 </div> 260 <div id="country" class="icon icon-location"> 261 <select class="selectboxit" id="mySelect" onchange="country(this.value,0)"> 262 @foreach (var country in @Country) 263 { 264 if(!string.IsNullOrWhiteSpace(country)) 265 { 266 <option id="@country" value="@country"></option> 267 } 268 } 269 </select> 270 @foreach (var country in @Country) 271 { 272 if(!string.IsNullOrWhiteSpace(country)) 273 { 274 <script> 275 var cu=CheckCountry("@country"); 276 var text1 = document.createTextNode(cu); 277 document.getElementById("@country").appendChild(text1); 278 hash(); 279 </script> 280 } 281 } 282 </div> 283 <div id="navigation"> 284 <div id="navigation-button" class="icon icon-menu"></div> 285 @GetValue("DwNavigation(drawernavigation)") 286 287 </div> 288 </div> 289 <div id="header-logo"> <a href="/Default.aspx?ID=@firstpageid"> <img src='@GetString("Item.Area.GeneralLogo")' style="max-height:100px;" alt="Logo"> 290 </a> </div> 291 </header> 292 <div> 293 <!-- MAIN CONTENT --> 294 295 @GetValue("Title(News page)") 296 @GetValue("Description(News page with left navigation and content area 3+9)") 297 298 @{ 299 string siteurl = GetGlobalValue("Global:Request.Url").ToString(); 300 string attributeValue = ""; 301 } 302 303 304 @if(GetBoolean("Item.Page.LayoutShowBreadcrumb")){ 305 <div class="pg-opt pin white"> 306 <div class="container"> 307 <div class="row"> 308 <div class="col-lg-3 col-md-3 hidden-sm hidden-xs"> 309 @if (GeneralSettings.Navigation.BreadcrumbMode != "light") 310 { 311 <div class="dw-breadcrumb-title">@GetGlobalValue("Global:Page.Top.Name")</div> 312 } 313 </div> 314 <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12"> 315 @GetValue("DwNavigation(breadcrumb)") 316 </div> 317 </div> 318 </div> 319 </div> 320 } 321 322 <section class="slice white animate-hover-slide"> 323 <div class="w-section"> 324 <div class="container"> 325 <div class="row"> 326 @if(!GetBoolean("Item.Page.LayoutHideLeftMenu")) { 327 <div class="col-md-3 hidden-sm hidden-xs"> 328 <div class="widget"> 329 <h3 class="dw-section-title dw-section-title-small"><span>@GetGlobalValue("Global:Page.Name")</span></h3> 330 <text>&nbsp;</text> 331 @GetValue("DwNavigation(leftnavigation)") 332 </div> 333 </div> 334 } 335 336 <div class="col-md-9 col-sm-12 col-xs-12"> 337 <div class="post-item"> 338 @if (!string.IsNullOrWhiteSpace(GetString("Item.GeneralImage"))) { 339 attributeValue = GetString("Item.GeneralImage"); 340 <div class="post-meta-top"> 341 <div class="post-image"> 342 <div class="img-responsive" style="background-image: url(/Admin/Public/GetImage.ashx?image=@attributeValue&width=1280&height=350&compression=90&crop=1);height:350px;background-position:bottom center"> 343 </div> 344 </div> 345 </div> 346 } 347 <div class="post-content"> 348 <h2 class="post-title">@GetValue("Item.Heading")</h2> 349 <span class="post-tags">@Translate("Written by", "Written by") @GetValue("Item.GeneralAuthor") - @GetValue("DwDateLong")</span> 350 <div class="clearfix"></div> 351 352 <div class="post-desc"> 353 <p>@GetValue("Item.Text")</p> 354 </div> 355 356 @if (GetBoolean("Item.Page.FacebookLikeButton")){ 357 <p>&nbsp;</p> 358 <iframe src="//www.facebook.com/plugins/like.php?href=@siteurl&amp;width=200&amp;layout=button_count&amp;action=recommend&amp;show_faces=true&amp;share=true&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;" allowtransparency="true"></iframe> 359 } 360 </div> 361 </div> 362 363 <div class="col-md-9" dwcontent="" id="modulecontent" title="For modules"></div> 364 </div> 365 </div> 366 </div> 367 </div></section> 368 369 370 <!-- Footer --> 371 <footer> 372 @{ 373 string ficon = ""; 374 string fname = ""; 375 string flink = ""; 376 } 377 <div id="footer-links" class="clearfix"> 378 <ul id="links-left"> 379 @foreach (LoopItem socialitem in GetLoop("Item.Area.FooterLinks")) 380 { 381 ficon = socialitem.GetString("Item.Area.FooterLinks.Icon"); 382 fname = socialitem.GetString("Item.Area.FooterLinks.Name"); 383 flink = socialitem.GetString("Item.Area.FooterLinks.Link"); 384 385 <li><a href="@flink"><i class="icon @ficon"></i>@fname</a></li> 386 } 387 </ul> 388 389 @GetValue("DwNavigation(dwright)") 390 391 </div> 392 <div id="copyright">Copyright &copy; <span style="color:#585858;">@GetValue("Item.Area.FooterCompanyName")</span> 2015. @*@GetGlobalValue("Global:Server.Date.Year").*@ @Translate("All Rights Reserved", "All Rights Reserved")</div> 393 </footer> 394 395 <!-- Document Ready --> 396 <script src="/Files/Templates/Designs/star360/scripts/ready.js"></script> 397 <script type="text/javascript"></script></div></body></html>