Error compiling template "Designs/star360/_parsed/News.parsed.cshtml"
Line 320: 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 <!-- Google Tag Manager --> 133 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 134 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 135 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 136 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 137 })(window,document,'script','dataLayer','GTM-WMP7B5C');</script> 138 <!-- End Google Tag Manager --> 139 <!-- Meta Tags --> 140 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 141 <meta name="viewport" content="width=device-width, initial-scale=1"> 142 <!-- Variables --> 143 @{ 144 var attrValue = ""; 145 string MetaDescription = GetString("Meta.Description"); 146 string MetaKeywords = GetString("Meta.Keywords"); 147 var favicon = @GetString("Item.Area.Favicon"); 148 string cssAutoPath = "/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css?t=@areaUpdated.Ticks"; 149 string currentpageid = GetString("DwPageID"); 150 string firstpageid = GetString("DwAreaFirstActivePageID"); 151 string loginpageid = "8482"; 152 string searchplaceholder = Translate("Search", "Search"); 153 string IPAddress = HttpContext.Current.Request.Params["HTTP_CLIENT_IP"] ?? HttpContext.Current.Request.UserHostAddress; 154 } 155 @{ 156 157 string[] Country = new string[12]; 158 string[] Language = new string[12]; 159 160 var sitesql = "SELECT TOP 20 AreaID,AreaName,AreaDomain,AreaLanguage,AreaCulture,AreaActive FROM Area where Area.AreaActive<>0"; 161 using (var reader = Dynamicweb.Database.CreateDataReader(sitesql)) { 162 String Culture; 163 164 int wordcount = 0; 165 166 while (reader.Read()) { 167 Culture=reader["AreaCulture"].ToString(); 168 string[] words = Culture.Split('-'); 169 if (!Language.Contains(words[0].ToString())) 170 { 171 Language[wordcount]= words[0].ToString(); 172 } 173 if(!Country.Contains(words[1].ToString().ToLower())) 174 { 175 Country[wordcount]=words[1].ToString().ToLower(); 176 } 177 wordcount=wordcount+1; 178 } 179 } 180 } 181 182 183 <title>@GetValue("Title")</title> 184 @GetValue("MetaTags") 185 @GetValue("CopyRightNotice") 186 187 188 189 <meta name="robots" content="index, follow"> 190 <link href="@favicon" rel="icon" type="image/png"> 191 <link rel="stylesheet" href="/Files/Templates/Designs/star360/assets/styles/bootstrap.min.css" type="text/css"> 192 <link rel="stylesheet" href="/Files/Templates/Designs/star360/assets/styles/font-awesome.min.css" type="text/css"> 193 <link rel="stylesheet" href="/Files/Templates/Designs/star360/assets/styles/jquery.fancybox.min.css" media="screen"> 194 <!-- Scripts --> 195 <script src="/Files/Templates/Designs/star360/scripts/jquery-1.11.3.min.js"></script> 196 <script src="/Files/Templates/Designs/star360/scripts/jquery-migrate-1.2.1.min.js"></script> 197 <script src="/Files/Templates/Designs/star360/scripts/jquery-ui.min.js"></script> 198 <script src="/Files/Templates/Designs/star360/scripts/selectboxit.min.js"></script> 199 <script src="/Files/Templates/Designs/star360/scripts/cycle2.min.js"></script> 200 <script src="/Files/Templates/Designs/star360/scripts/magnific-popup.min.js"></script> 201 <script src="/Files/Templates/Designs/star360/scripts/mcustom-scrollbar.min.js"></script> 202 <script src="/Files/Templates/Designs/star360/scripts/modernizr.js"></script> 203 <link href="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/css/jasny-bootstrap.min.css" rel="stylesheet" type="text/css" media="screen"> 204 <!-- Stylesheets --> 205 <link href="/Files/Templates/Designs/star360/assets/styles/normalize.css" rel="stylesheet" type="text/css" media="all"> 206 <link href="/Files/Templates/Designs/star360/assets/styles/selectboxit.css" rel="stylesheet" type="text/css" media="all"> 207 <link href="/Files/Templates/Designs/star360/assets/styles/magnific-popup.css" rel="stylesheet" type="text/css" media="all"> 208 <link href="/Files/Templates/Designs/star360/assets/styles/mcustom-scrollbar.css" rel="stylesheet" type="text/css" media="all"> 209 <link href="/Files/Templates/Designs/star360/assets/style.css" rel="stylesheet" type="text/css" media="all"> 210 211 <script src="/Files/Templates/Designs/star360/scripts/function.js"></script> 212 213 <!-- Title --> 214 <title>Star 360 Holdings</title> 215 216 @{ 217 string googleTrackingId = GetString("Item.Area.Google_Analytic_ID"); 218 219 if (!string.IsNullOrWhiteSpace(googleTrackingId)) 220 { 221 <script type="text/javascript"> 222 var _gaq = [['_setAccount', '@googleTrackingId'], ['_trackPageview']]; 223 (function(d, t) { 224 var g = d.createElement(t), 225 s = d.getElementsByTagName(t)[0]; 226 g.async = true; 227 g.src = '//www.google-analytics.com/ga.js'; 228 s.parentNode.insertBefore(g, s); 229 })(document, 'script'); 230 </script> 231 } 232 233 } 234 235 @GetValue("Stylesheets") 236 @GetValue("Javascripts") 237 </head> 238 239 <body> 240 <!-- Google Tag Manager (noscript) --> 241 <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WMP7B5C" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> 242 <!-- End Google Tag Manager (noscript) --> 243 244 <!-- Header --> 245 @{ 246 string searchpage=GetString("Item.Area.SearchPage"); 247 } 248 <header> 249 <div id="header-container" class="clearfix"> 250 <div id="search" class="icon border"> 251 <form id="searchForm1" method="get" action="Default.aspx"> 252 <input type="hidden" name="ID" value="@searchpage"> 253 <input type="search" name="q" tabindex="1" autocomplete="off" placeholder="@searchplaceholder"> 254 <input type="submit" value="Search"> 255 </form> 256 </div> 257 <div id="language" class="icon icon-globe"> 258 <select id="language" onchange="country(0,this.value)"> <!-- --> 259 @{ 260 261 foreach (var lang in @Language) 262 { 263 if(!string.IsNullOrWhiteSpace(lang)) 264 { 265 <option id="@lang" value="@lang">@lang.ToUpper()</option> 266 } 267 } 268 } 269 </select> 270 </div> 271 <div id="country" class="icon icon-location"> 272 <select class="selectboxit" id="mySelect" onchange="country(this.value,0)"> 273 @foreach (var country in @Country) 274 { 275 if(!string.IsNullOrWhiteSpace(country)) 276 { 277 <option id="@country" value="@country"></option> 278 } 279 } 280 </select> 281 @foreach (var country in @Country) 282 { 283 if(!string.IsNullOrWhiteSpace(country)) 284 { 285 <script> 286 var cu=CheckCountry("@country"); 287 var text1 = document.createTextNode(cu); 288 document.getElementById("@country").appendChild(text1); 289 hash(); 290 </script> 291 } 292 } 293 </div> 294 <div id="navigation"> 295 <div id="navigation-button" class="icon icon-menu"></div> 296 @GetValue("DwNavigation(drawernavigation)") 297 298 </div> 299 </div> 300 <div id="header-logo"> <a href="/Default.aspx?ID=@firstpageid"> <img src='@GetString("Item.Area.GeneralLogo")' style="max-height:100px;" alt="Logo"> 301 </a> </div> 302 </header> 303 <div> 304 <!-- MAIN CONTENT --> 305 306 @GetValue("Title(News page)") 307 @GetValue("Description(News page with left navigation and content area 3+9)") 308 309 @{ 310 string siteurl = GetGlobalValue("Global:Request.Url").ToString(); 311 string attributeValue = ""; 312 } 313 314 315 @if(GetBoolean("Item.Page.LayoutShowBreadcrumb")){ 316 <div class="pg-opt pin white"> 317 <div class="container"> 318 <div class="row"> 319 <div class="col-lg-3 col-md-3 hidden-sm hidden-xs"> 320 @if (GeneralSettings.Navigation.BreadcrumbMode != "light") 321 { 322 <div class="dw-breadcrumb-title">@GetGlobalValue("Global:Page.Top.Name")</div> 323 } 324 </div> 325 <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12"> 326 @GetValue("DwNavigation(breadcrumb)") 327 </div> 328 </div> 329 </div> 330 </div> 331 } 332 333 <section class="slice white animate-hover-slide"> 334 <div class="w-section"> 335 <div class="container"> 336 <div class="row"> 337 @if(!GetBoolean("Item.Page.LayoutHideLeftMenu")) { 338 <div class="col-md-3 hidden-sm hidden-xs"> 339 <div class="widget"> 340 <h3 class="dw-section-title dw-section-title-small"><span>@GetGlobalValue("Global:Page.Name")</span></h3> 341 <text>&nbsp;</text> 342 @GetValue("DwNavigation(leftnavigation)") 343 </div> 344 </div> 345 } 346 347 <div class="col-md-9 col-sm-12 col-xs-12"> 348 <div class="post-item"> 349 @if (!string.IsNullOrWhiteSpace(GetString("Item.GeneralImage"))) { 350 attributeValue = GetString("Item.GeneralImage"); 351 <div class="post-meta-top"> 352 <div class="post-image"> 353 <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"> 354 </div> 355 </div> 356 </div> 357 } 358 <div class="post-content"> 359 <h2 class="post-title">@GetValue("Item.Heading")</h2> 360 <span class="post-tags">@Translate("Written by", "Written by") @GetValue("Item.GeneralAuthor") - @GetValue("DwDateLong")</span> 361 <div class="clearfix"></div> 362 363 <div class="post-desc"> 364 <p>@GetValue("Item.Text")</p> 365 </div> 366 367 @if (GetBoolean("Item.Page.FacebookLikeButton")){ 368 <p>&nbsp;</p> 369 <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> 370 } 371 </div> 372 </div> 373 374 <div class="col-md-9" dwcontent="" id="modulecontent" title="For modules"></div> 375 </div> 376 </div> 377 </div> 378 </div></section> 379 380 381 <!-- Footer --> 382 <footer> 383 @{ 384 string ficon = ""; 385 string fname = ""; 386 string flink = ""; 387 } 388 <div id="footer-links" class="clearfix"> 389 <ul id="links-left"> 390 @foreach (LoopItem socialitem in GetLoop("Item.Area.FooterLinks")) 391 { 392 ficon = socialitem.GetString("Item.Area.FooterLinks.Icon"); 393 fname = socialitem.GetString("Item.Area.FooterLinks.Name"); 394 flink = socialitem.GetString("Item.Area.FooterLinks.Link"); 395 396 <li><a href="@flink"><i class="icon @ficon"></i>@fname</a></li> 397 } 398 </ul> 399 400 @GetValue("DwNavigation(dwright)") 401 402 </div> 403 <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> 404 </footer> 405 406 <!-- Document Ready --> 407 <script src="/Files/Templates/Designs/star360/scripts/ready.js"></script> 408 <script type="text/javascript"></script></div></body></html>