Error compiling template "Designs/PacificBag/_parsed/leftMenu.parsed.cshtml"
Line 1676: No overload for method 'PageTitle' takes 0 arguments
1 @inherits RazorTemplateBase<RazorTemplateModel<Template>>
2 @using System
3 @using System.Linq
4 @using Dynamicweb.Rendering
5 @using Dynamicweb.Content
6 @using System.Text.RegularExpressions
7 @using System.Web.UI.HtmlControls
8 @{ string designName = GetString("Template:DesignBaseUrl").Replace("/Files/Templates/Designs/", "").Replace("/", "");}@functions{
9 public static string GetImage(string sourceString, int imageWidth, int imageHeight, int imageWidthTablet = 0, int imageHeightTablet = 0, int imageWidthMobile = 0, int imageHeightMobile = 0, string imageFormat = "jpg", int imageCompression = 0, int imageCrop = 5, string background = "", string designName = "PacificBag")
10 {
11 Dynamicweb.Frontend.PageView currentPageview = Dynamicweb.Frontend.PageView.Current();
12 string currDevice = currentPageview.Device.ToString();
13 string alternativeImage = !String.IsNullOrEmpty(currentPageview.Area.Item["NoImage"].ToString()) ? currentPageview.Area.Item["NoImage"].ToString() : "/Files/Templates/Designs/"+ designName + "/images/alternativeImage.jpg";
14 string widthString = "";
15 string heightString = "";
16 string getImageFormat = imageFormat != "jpg" ? "&Format=" + imageFormat : "";
17 string getImageCompression = imageCompression != 0 ? "&Compression=" + imageCompression : "";
18 string bgColor = !string.IsNullOrEmpty(background) ? "&Background="+background : "";
19 int getImageWidth = imageWidth != 0 ? imageWidth : 0;
20 int getImageHeight = imageHeight != 0 ? imageHeight : 0;
21
22 if (currDevice == Dynamicweb.Frontend.Devices.DeviceType.Tablet.ToString())
23 {
24 getImageWidth = imageWidthTablet != 0 ? imageWidthTablet : getImageWidth;
25 getImageHeight = imageHeightTablet != 0 ? imageHeightTablet : getImageHeight;
26 }
27 else if (currDevice == Dynamicweb.Frontend.Devices.DeviceType.Mobile.ToString())
28 {
29 getImageWidth = imageWidthMobile != 0 ? imageWidthMobile : getImageWidth;
30 getImageHeight = imageHeightMobile != 0 ? imageHeightMobile : getImageHeight;
31 }
32
33 if (getImageWidth != 0)
34 {
35 widthString = "&Width=" + getImageWidth;
36 }
37 if (getImageHeight != 0)
38 {
39 heightString = "&Height=" + getImageHeight;
40 }
41
42 string output = "/Admin/Public/GetImage.ashx?Image=" + sourceString + widthString + heightString + "&altFmImage_path=" + alternativeImage + getImageFormat + getImageCompression + "&Crop=" + imageCrop + bgColor;
43 return output;
44 }
45
46 public static string GetImageWhiteSpace(string sourceString, int imageWidth, int imageHeight, int imageWidthTablet = 0, int imageHeightTablet = 0, int imageWidthMobile = 0, int imageHeightMobile = 0, string imageFormat = "jpg", int imageCompression = 0, int imageCrop = 5, string background = "", string designName = "PacificBag")
47 {
48 Dynamicweb.Frontend.PageView currentPageview = Dynamicweb.Frontend.PageView.Current();
49 string currDevice = currentPageview.Device.ToString();
50 string alternativeImage = "/Files/Templates/Designs/" + designName + "/images/white80.png";
51 string widthString = "";
52 string heightString = "";
53 string getImageFormat = imageFormat != "jpg" ? "&Format=" + imageFormat : "";
54 string getImageCompression = imageCompression != 0 ? "&Compression=" + imageCompression : "";
55 string bgColor = !string.IsNullOrEmpty(background) ? "&Background="+background : "";
56 int getImageWidth = imageWidth != 0 ? imageWidth : 0;
57 int getImageHeight = imageHeight != 0 ? imageHeight : 0;
58
59 if (currDevice == Dynamicweb.Frontend.Devices.DeviceType.Tablet.ToString())
60 {
61 getImageWidth = imageWidthTablet != 0 ? imageWidthTablet : getImageWidth;
62 getImageHeight = imageHeightTablet != 0 ? imageHeightTablet : getImageHeight;
63 }
64 else if (currDevice == Dynamicweb.Frontend.Devices.DeviceType.Mobile.ToString())
65 {
66 getImageWidth = imageWidthMobile != 0 ? imageWidthMobile : getImageWidth;
67 getImageHeight = imageHeightMobile != 0 ? imageHeightMobile : getImageHeight;
68 }
69
70 if (getImageWidth != 0)
71 {
72 widthString = "&Width=" + getImageWidth;
73 }
74 if (getImageHeight != 0)
75 {
76 heightString = "&Height=" + getImageHeight;
77 }
78
79 string output = "/Admin/Public/GetImage.ashx?Image=" + sourceString + widthString + heightString + "&altFmImage_path=" + alternativeImage + getImageFormat + getImageCompression + "&Crop=" + imageCrop + bgColor;
80 return output;
81 }
82 }
83 @functions{
84 public string GetCurrentUrl()
85 {
86 string currentUrl = Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString() + "://" + Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString() + Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString();
87
88 return currentUrl;
89 }
90 }
91 @using System.Runtime
92 @using Dynamicweb.Rendering
93 @using System.Text.RegularExpressions
94 @inherits RazorTemplateBase<RazorTemplateModel<Template>>
95
96 @helper OgMeta(string designName)
97 {
98 if (string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["ProductID"]))
99 {
100 @SnippetStart("OGMeta")<meta property="og:title" content='@GetString("Title")'>
101 <meta property="og:image" content='@Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString()://@Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString()/Files/Templates/Designs/@designName/images/logo.png'>
102 <meta property="og:site_name" content='@GetString("Item.Area.CompanyName")'>
103 <meta property="og:url" content='@Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString()://@Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString()@Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString()'>
104 <meta property="og:description" content='@StripHtml(GetString("Meta.Description"))'>
105 <meta property="og:type" content="article">
106 <meta property="og:locale" content='@Pageview.GlobalTags.GetTagByName("Global:Area.LongLang").Value.ToString().Replace("-", "_")'>
107 @SnippetEnd("OGMeta")
108 }
109 }
110 @helper HtmlHead(string designName)
111 {
112 string designFolder = GetString("Template:DesignBaseUrl");
113 string robots = "";
114 string ipCountry = Dna.IP.Frontend.GetCountryCode();
115 string countryCodeModule = !string.IsNullOrEmpty(ipCountry) ? ipCountry : "US";
116 string userCountryCode = (Pageview.User != null && !string.IsNullOrEmpty(Pageview.User.Country)) ? Pageview.User.Country : ipCountry;
117 string userState = Pageview.User != null ? Pageview.User.State : string.Empty;
118 string userAccountsNumber = (System.Web.HttpContext.Current.Session["AccountsNumber"] ?? "").ToString();
119 robots = (GetBoolean("Item.Area.DemoBanner") || GetBoolean("Item.Area.NoIndex")) ? CommaSplittedString(robots, "noindex") : "";
120 robots += (GetBoolean("Item.Area.DemoBanner") || GetBoolean("Item.Area.NoFollow")) ? CommaSplittedString(robots, "nofollow") : "";
121
122 <head>
123 <title>@GetValue("Title")</title>
124 <meta http-equiv="content-type" content="text/html; charset=utf-8">
125 <meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=no">
126 <meta http-equiv="X-UA-Compatible" content="IE=edge">
127 <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE">
128 @if (!string.IsNullOrEmpty(robots))
129 {
130 <meta name="robots" content="@robots">
131 }
132 @OgMeta(designName)
133 @RenderSnippet("OGMeta")
134 @GetString("MetaTags")
135 @GetString("CopyRightNotice")
136 @GetString("Stylesheets")
137 @RenderSnippet("outScripts")
138 @GetString("Javascripts")
139
140
141 <script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"21000061"};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");</script>
142
143 <link rel="shortcut icon" href="@(designFolder)images/favicon.ico" type="image/x-icon">
144 @{
145 var minify = GetBoolean("Item.Area.Minify_CSS_And_JavaScript");
146 var styleBundle = Dna.Optimizer.Renderer.RenderStyles(string.Format("{0}css", designFolder), minify, true, "-main-styles", new[] { "exceptions" });
147 var scriptBundle = Dna.Optimizer.Renderer.RenderScripts(string.Format("{0}js", designFolder), minify, true, "-main-scripts", new[] { "exceptions" });
148 }
149 <link rel="stylesheet" href="@styleBundle">
150 <script src="@scriptBundle"></script>
151 @SnippetStart("outScripts") @SnippetEnd("outScripts")
152 <!--[if lte IE 9]>
153 <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
154 <script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.1.0/respond.min.js"></script>
155 <![endif]-->
156 <script>
157 @RenderSnippet("jsVariables")
158 @SnippetStart("jsVariables") @SnippetEnd("jsVariables")
159
160 var obj_pages = {
161 str_miniCart: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.MiniCart"))',
162 str_login: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.Login"))',
163 str_globalTranslates: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.GlobalTranslates"))',
164 str_contactPopup : '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.ContactUs_Popup"))',
165 str_cartInformation: '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.Cart_Information"))',
166 str_typeAhead : '@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetString("Item.Area.TypeAhead"))'
167 },
168 obj_user = {
169 str_country: '@userCountryCode',
170 str_state: '@userState',
171 str_accountsNumber:'@userAccountsNumber'
172 },
173 obj_settings = {
174 str_contactTimeout: '@GetString("Item.Area.Time")',
175 str_cartQty: '@GetString("Ecom:Order.OrderLines.TotalProductQuantity")'
176 },
177 obj_translates = {
178 str_seeAll: '@Translate("seeAllThe", "See all the")',
179 str_results: '@Translate("results", "results")',
180 str_invalidAddress: '@Translate("invalidAddress", "Something isn’t correct with your address. Please check that each *required line has appropriate information in it, e.g. Address line 1 has an actual street address.")'
181 };
182 $(function () {
183 @UserDoesNotExist()
184 @RenderSnippet("jsOnLoadVariables")
185 @SnippetStart("jsOnLoadVariables") @SnippetEnd("jsOnLoadVariables")
186 @RenderSnippet("jsOnLoad")
187 @SnippetStart("jsOnLoad") @SnippetEnd("jsOnLoad")
188 });
189 @if(!string.IsNullOrWhiteSpace(GetString("Item.Area.GoogleAnalytics")))
190 {
191 <text>
192 (function (i, s, o, g, r, a, m) {
193 i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
194 (i[r].q = i[r].q || []).push(arguments)
195 }, i[r].l = 1 * new Date(); a = s.createElement(o),
196 m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
197 })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
198
199 ga('create', '@GetString("Item.Area.GoogleAnalytics")', 'auto');
200 ga('send', 'pageview');
201 </text>
202 }
203 </script>
204 @{
205 var googleAdwords = GetString("Item.Area.GoogleAdwords");
206 }
207 @if (!string.IsNullOrWhiteSpace(googleAdwords))
208 {
209 <script async="" src="https://www.googletagmanager.com/gtag/js?id=@googleAdwords"></script>
210 <script>
211 window.dataLayer = window.dataLayer || [];
212 function gtag(){dataLayer.push(arguments);}
213 gtag('js', new Date());
214
215 gtag('config', '@googleAdwords');
216 </script>
217 }
218
219 @RenderSnippet("eCommerceTracking")
220 @SnippetStart("eCommerceTracking") @SnippetEnd("eCommerceTracking")
221 </head>
222 }
223 @helper RenderPageImageVideo(string image, string video)
224 {
225 if (!String.IsNullOrWhiteSpace(video))
226 {
227 image = "/Admin/Public/GetImage.ashx?Image=" + image + "&Height=1080&Crop=5";
228
229 <section id="topMediaContainer" data-image="@image" data-video="@video">
230 @if (!String.IsNullOrWhiteSpace(image))
231 {
232 <img src="@image" class="hidden">
233 }
234 @if (!String.IsNullOrWhiteSpace(video))
235 {
236 <span class="hidden">@video</span>
237 }
238 </section>
239 @SnippetStart("jsOnLoad")
240 @:onLoadTopMediaContainer("@(GetString("Item.Page.ButtonText"))", "@(GetString("Item.Page.ButtonLink"))");
241 @SnippetEnd("jsOnLoad")
242 }
243 }
244
245 @helper RenderPageHeading(string heading, string subHeading, string image, string video, bool leftAlign)
246 {
247 image = !String.IsNullOrWhiteSpace(image) ? "/Admin/Public/GetImage.ashx?Image=" + image + "&Height=1080&Crop=5" : "";
248 string topMediaContainerClass = GetBoolean("Item.Page.BigHeader") ? "bigHeader" : String.Empty;
249 topMediaContainerClass += GetBoolean("Item.Page.NoWhiteText") ? " noWhiteText" : String.Empty;
250 var request = System.Web.HttpContext.Current.Request.Params;
251 string buttonText = GetString("Item.Page.ButtonText"),
252 buttonLink = GetString("Item.Page.ButtonLink");
253
254 // Group Image - Banner
255 if (request["groupid"] != null)
256 {
257 var group = Dynamicweb.Ecommerce.Products.Group.GetGroupById(request["groupid"].ToString());
258
259 if(group != null){
260 if (group.ParentGroups.Count > 0)
261 {
262 group = group.ParentGroups[0];
263 }
264
265 string groupName = group.Name;
266 string groupImage = !string.IsNullOrWhiteSpace(group.LargeImage) ? group.LargeImage : group.SmallImage;
267 string groupDescription = group.ProductGroupFieldValues.GetProductGroupFieldValue("BannerDescription").Value.ToString();
268
269 if (!string.IsNullOrWhiteSpace(groupImage))
270 {
271 heading = groupName;
272 subHeading = groupDescription;
273 image = "/Admin/Public/GetImage.ashx?Image=/Files" + groupImage + "&Height=1080&Crop=5";
274 }
275 }
276
277 }
278
279 if (!String.IsNullOrWhiteSpace(image) && String.IsNullOrWhiteSpace(video))
280 {
281 string layoutType = !string.IsNullOrWhiteSpace(subHeading) ? "twoColumn" : "oneColumn";
282 string headerClass = leftAlign ? "text-left" : "";
283
284 <section id="pageHeadingContainer" class="@topMediaContainerClass" style="background-image:url('@image')">
285 <div id="pageHeadingContent" class="container @layoutType">
286 <p class="h1 @headerClass">@heading</p>
287 <p>@subHeading
288 @if (!string.IsNullOrEmpty(buttonLink))
289 {
290 <a class="btn btn-bg pull-left" href="@buttonLink">@buttonText</a>
291 }
292 </p>
293 </div>
294 </section>
295 }
296 }
297 @helper UserDoesNotExist()
298 {
299 if (Dynamicweb.Environment.ExecutingContext.IsFrontEnd() && !Dynamicweb.Security.UserManagement.User.IsExtranetUserLoggedIn())
300 {
301 if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["Password"]) && !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["Username"]))
302 {
303 @SnippetStart("jsOnLoad")
304 @:var showLogin = true;
305 @:alert("@(Translate("userNotFoundInTheDatabase", "User not found in the database"))");
306 @SnippetEnd("jsOnLoad")
307 }
308 }
309 }
310 @helper Logo(string cssclass, string companyName, string designName)
311 {
312 string logo = !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["print"]) ? "/Admin/Public/GetImage.ashx?Image=/Files/Templates/Designs/"+designName+"/images/logo.png&Width=220" : "/Files/Templates/Designs/"+designName+"/images/logo.png";
313
314 <figure class="@cssclass">
315 <a href="/">
316 <img class="img-responsive" src="@logo" alt="@companyName" title="@companyName">
317 </a>
318 </figure>
319 }
320 @helper DemoBanner()
321 {
322 if (GetBoolean("Item.Area.Banner") && System.Web.HttpContext.Current.Request.Cookies["demoMode"] == null)
323 {
324 <div class="demoMode">Demo</div>
325 }
326 }
327 @helper Copyright()
328 {
329 <div class="col-xs-12 copyright">© @DateTime.Now.Year @GetString("Item.Area.CompanyName") @*- @GetString("Item.Area.Copyright")*@</div>
330 }
331
332 @helper RenderSearchBar()
333 {
334 var resultsPage = GetInteger("Item.Area.SearchResults");
335 var q = (System.Web.HttpContext.Current.Request["q"] ?? "").ToString();
336
337 <div id="searchContainer" class="col-sm-offset-4 col-sm-8 col-xs-12">
338 <div class="searchContainer col-xs-12">
339 <form action="/Default.aspx" id="searchForm">
340 <fieldset class="col-xs-4 Select mandatory pull-right hidden">
341 <label for="searchSubmit" class="hide">@Translate("search", "Search")</label>
342 <select name="ID">
343 <option value="@resultsPage" selected="">@Translate("productSearch", "Product Search")</option>
344 </select>
345 </fieldset>
346 <fieldset class="col-xs-12 TextInput mandatory noPadding">
347 <label for="searchSubmit" class="hide">@Translate("search", "Search")</label>
348 <input placeholder='@Translate("search", "Search")' id="searchSubmit" data-error='@Translate("searchText", "Search for something")' type="text" name="q" value="@q">
349 </fieldset>
350 <input type="submit" class="hidden" value="send">
351 </form>
352 </div>
353 <div id="autocompleteWrap"> </div>
354 </div>
355 }
356
357 @functions {
358 private string CommaSplittedString(string CommaSplittedString, string NewString)
359 {
360
361 if (!string.IsNullOrEmpty(CommaSplittedString))
362 {
363 CommaSplittedString += ", ";
364 }
365 CommaSplittedString += NewString;
366
367 return CommaSplittedString;
368 }
369 public static string StripHtml(string source)
370 {
371 return Regex.Replace(source, "<.*?>", string.Empty);
372 }
373 }
374 @{
375 var currentQuery = "Default.aspx" + System.Web.HttpContext.Current.Request.Url.Query;
376 if (!string.IsNullOrEmpty(currentQuery) && currentQuery.ToLower().Equals(string.Format("default.aspx?id={0}", Pageview.Page.ID)))
377 {
378 var newQuery = currentQuery;
379 var filterParamters = GetString("Item.Page.FilterParameters").Split(new string[] {"&", "?"}, StringSplitOptions.RemoveEmptyEntries);
380
381 foreach (var fp in filterParamters)
382 {
383 if (!currentQuery.Contains(fp.Substring(0, fp.IndexOf("=")) + "="))
384 {
385 newQuery += newQuery.Contains("?") ? "&" : "?";
386 newQuery += fp;
387 }
388 }
389
390 if (currentQuery != newQuery)
391 {
392 System.Web.HttpContext.Current.Response.Redirect(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(newQuery), true);
393 }
394 }
395
396 string device = Pageview.Device.ToString();
397 string homeOrSubpage = GetString("DwAreaFirstPageID") == Pageview.Page.ID.ToString() ? "home" : "subpage";
398 string print = !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["print"]) ? "printOrPdf" : "";
399 string contactUsPage = GetString("Item.Area.ContactUs");
400 string countryCode = Dna.IP.Frontend.GetCountryCode();
401 string longLang = Pageview.GlobalTags.GetTagByName("Global:Area.LongLang").Value.ToString();
402 string email = GetString("Item.Area.Email");
403 string phone = GetString("Item.Area.Phone");
404 bool userIsLoggedIn = Dynamicweb.Security.UserManagement.User.IsExtranetUserLoggedIn();
405 bool isPrint = !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["print"]);
406 bool bol_backofficeLogged = Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser() != null ? true : false;
407 List<LoopItem> socialMedia = GetLoop("Item.Area.SocialNetworks");
408 List<LoopItem> websiteLanguages = GetLoop("WebsiteLanguages");
409 if (userIsLoggedIn)
410 {
411 string logedUserId = Pageview.User.CurrentSecondaryUser == null ? Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUserId().ToString() : Pageview.User.CurrentSecondaryUser.ID.ToString();
412 System.Web.HttpContext.Current.Session["UserId"] = logedUserId;
413
414 if (System.Web.HttpContext.Current.Request["DWExtranetSecondaryUserSelector"] != null && Pageview.User.CurrentSecondaryUser != null)
415 {
416 System.Web.HttpContext.Current.Session["AccountsNumber"] = Pageview.User.CurrentSecondaryUser.GetUsersICanSetAsSecondary().Count;
417 }
418 }
419 }<!DOCTYPE HTML>
420 <!--[if lt IE 8 ]><html class="ie7" lang="@(longLang)"><![endif]--><!--[if IE 8 ]><html class="ie8" lang="@(longLang)"><![endif]--><!--[if IE 9 ]><html class="ie9" lang="@(longLang)"><![endif]--><!--[if (gt IE 9)|!(IE)]><!-->
421 <html lang="@(longLang)">
422 <!--<![endif]-->
423 @HtmlHead(designName)
424 <body class="@device logged_@userIsLoggedIn.ToString() @homeOrSubpage @print" data-countrycode="@countryCode">
425 <div class="wrap">
426 <header id="headerContainer" class="container-fluid noPadding">
427 <h1 class="hidden">@GetString("Title")</h1>
428 <div id="topHeaderContainer" class="col-xs-12 noPadding">
429 <div class="container noPadding">
430 @Logo("col-md-4 col-sm-6 col-xs-12", GetString("Item.Area.CompanyName"), designName)
431 @if (!string.IsNullOrEmpty(GetString("DwNavigation(topMenu)")) && !isPrint)
432 {
433 <nav id="topMenuContainer" class="navbar navbar-default col-xs-12 col-sm-6 col-md-8">
434 <div class="col-xs-12 welcomeBack">
435 @if (userIsLoggedIn)
436 {
437 string userName = !string.IsNullOrWhiteSpace(Pageview.User.Name) ? Pageview.User.Name : string.Format("{0}{1}", Pageview.User.FirstName, Pageview.User.LastName);
438 string pageId = Pageview.Page.ID.ToString();
439 bool isImpersonate = Pageview.User.CurrentSecondaryUser != null;
440 string switchAccountUrl = string.Format("Default.aspx?ID={0}", (Pageview.Area.Item["ManageAccounts"] ?? "").ToString());
441
442 if (isImpersonate && !(System.Web.HttpContext.Current.Session["AccountsNumber"] ?? "").ToString().Equals("1"))
443 {
444 <span>@Translate("managingAccount", "Managing Account"): @(!string.IsNullOrWhiteSpace(userName) ? userName : Pageview.User.UserName)</span>
445 <a href="@switchAccountUrl">@Translate("switchAccount", "SwitchAccount")</a>
446 <a href="/Admin/Public/ExtranetLogoff.aspx">@Translate("logout", "Logout")</a>
447 }
448 else
449 {
450 <span>@Translate("welcomeBack", "Welcome Back,") @(!string.IsNullOrWhiteSpace(userName) ? userName : Pageview.User.UserName)</span>
451 <a href="/Admin/Public/ExtranetLogoff.aspx">@Translate("logout", "Logout")</a>
452 }
453 }
454 </div>
455 @RenderSearchBar()
456 @GetValue("DwNavigation(topMenu)")
457 </nav>
458 }
459 </div>
460 </div>
461 <div id="menuMainContainer" class="col-xs-12 noPadding">
462 <div id="mainNavContainer" class="col-xs-12 noPadding">
463 <div class="container noPadding">
464 @if (!string.IsNullOrEmpty(GetString("DwNavigation(menuMain)")))
465 {
466 <nav class="navbar navbar-default">
467 <div class="navbar-header">
468 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
469 <i class="fa fa-bars"></i>
470 </button>
471 </div>
472 <div id="navbar" class="navbar-collapse collapse noPadding">
473 @GetValue("DwNavigation(menuMain)")
474 </div>
475 </nav>
476 }
477 </div>
478 </div>
479 </div>
480 @RenderSnippet("loginForm")
481 </header>
482 @RenderPageImageVideo(GetString("Item.Page.Image"), GetString("Item.Page.Video"))
483 @RenderPageHeading(GetString("Item.Page.PageHeading"), GetString("Item.Page.PageSubHeading"), GetString("Item.Page.Image"), GetString("Item.Page.Video"), GetBoolean("Item.Page.PageHeadingAlignLeft"))
484
485 @if (!GetBoolean("Item.Page.Hide2ndLevelMenu") && !GetString("Item.ItemInstanceType").Equals("News"))
486 {
487 @GetValue("DwNavigation(groupMenu)")
488 }
489
490 <section id="contentWrapper">
491 @inherits RazorTemplateBase<RazorTemplateModel<Template>>
492 @using Dynamicweb.Rendering;
493
494
495 @inherits RazorTemplateBase<RazorTemplateModel<Template>>
496 @using Dynamicweb.Rendering;
497
498 @helper Breadcrumb() {
499 if (!string.IsNullOrEmpty(GetString("DwNavigation(breadCrumbsMenu2)")))
500 {
501 <div class="col-xs-12 noPadding">
502 <nav id="breadMenuContainer" class="col-xs-12 noPadding">
503 <ul id="breadCrumbsMenu">
504 <li><a href="/">@Translate("home", "Home")</a></li>
505 @GetValue("DwNavigation(breadCrumbsMenu2)")
506 @if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["productid"]))
507 {
508 <li>
509 »
510 @GetString("Title")
511 </li>
512 }
513 </ul>
514 </nav>
515 </div>
516 }
517 }
518
519 @helper PageTitle(string image, string video)
520 {
521 if (String.IsNullOrWhiteSpace(image) && String.IsNullOrWhiteSpace(video) && !GetBoolean("Item.Page.HidePageTitle"))
522 {
523 string heading = GetString("Item.Page.PageHeading"),
524 title = !String.IsNullOrEmpty(heading) ? heading : GetString("DwPageName");
525 <div class="container pageTitle">
526 <div class="h1">@title</div>
527 </div>
528 }
529 }
530
531 @helper CentralContent(string rightClass = "col-xs-12 noPadding") {
532 if (!string.IsNullOrEmpty(GetString("DwContent(fullWidthContent)")))
533 {
534 <section id="fullWidthContainer" class="container-fluid fullWidthSection">
535 <div id="fullWidthContent" class="row">@GetValue("DwContent(fullWidthContent)")</div>
536 </section>
537 }
538
539 if (!string.IsNullOrEmpty(GetString("DwContent(centralContent)")))
540 {
541 <div class="container">
542 <section id="centralContainer" class="col-xs-12 noPadding-xs">
543 <div id="centralContent" class="row">@GetValue("DwContent(centralContent)")</div>
544 </section>
545 </div>
546 }
547
548 if (!string.IsNullOrEmpty(GetString("DwContent(fullWidthContent2)")))
549 {
550 <section id="fullWidthContainer2" class="container-fluid fullWidthSection">
551 <div id="fullWidthContent2" class="row">@GetValue("DwContent(fullWidthContent2)")</div>
552 </section>
553 }
554
555 if (!string.IsNullOrEmpty(GetString("DwContent(centralContent2)")))
556 {
557 <div class="container">
558 <section id="centralContainer2" class="col-xs-12 noPadding-xs">
559 <div id="centralContent2" class="row">@GetValue("DwContent(centralContent2)")</div>
560 </section>
561 </div>
562 }
563 }
564
565 @Breadcrumb()
566 @PageTitle()
567 @if(!string.IsNullOrEmpty(GetString("DwNavigation(leftMenu)"))){
568 <nav id="leftMenuContainer" class="col-sm-3 noPaddingLeft">
569 @GetValue("DwNavigation(leftMenu)")
570 </nav>
571 }
572 @CentralContent("col-xs-9 noPadding")
573 </section>
574
575 @if (!isPrint)
576 {
577 <footer id="footer" class="container-fluid noPadding">
578 <div id="footerLargeMenuContainer" class="container-fluid noPadding">
579 <div class="container">
580 <div class="col-sm-12 socialContainer">
581 @if (socialMedia.Any())
582 {
583 @SnippetStart("socialMedia")
584 <ul class="noPadding" id="socialMedia">
585 @foreach (LoopItem socialItem in socialMedia)
586 {
587 string className = socialItem.GetString("Item.Area.SocialNetworks.Icon"),
588 socialName = socialItem.GetString("Item.Area.SocialNetworks.Name"),
589 socialLink = socialItem.GetString("Item.Area.SocialNetworks.Link");
590
591 socialLink = !string.IsNullOrEmpty(socialLink) ? socialLink : "#";
592
593 <li>
594 <a title="@socialName" class="@className fa" target="_blank" href="@socialLink">
595 <span class="hidden">@socialName</span>
596 </a>
597 </li>
598 }
599 </ul>
600 @SnippetEnd("socialMedia")
601 @RenderSnippet("socialMedia")
602 }
603 </div>
604
605 @if (!string.IsNullOrEmpty(GetString("DwNavigation(bottomMenu)")))
606 {
607 <nav id="bottomMenuContainer" class="col-xs-12">
608 @GetValue("DwNavigation(bottomMenu)")
609 </nav>
610 }
611
612 <div class="footerContactInfo col-xs-12 noPadding-left hidden">
613 <p class="noPadding">
614 <a href="mailto:@email">@email</a>
615 </p>
616 <p class="noPadding">
617 <a href="tel:@phone">@phone</a>
618 </p>
619 </div>
620
621 </div>
622 <div id="copyrightContainer" class="container-fluid">
623 <div class="container">
624 <div class="row">
625 <div class="col-xs-12 col-md-6">@Copyright()</div>
626 <div class="col-xs-12 col-md-6">
627 @if (!string.IsNullOrEmpty(GetString("DwNavigation(copyrightMenu)")))
628 {
629 <nav id="copyrightMenuContainer">
630 @GetValue("DwNavigation(copyrightMenu)")
631 </nav>
632 }
633
634 </div>
635 </div>
636 </div>
637 </div>
638 @DemoBanner()
639 </div></footer>
640 }
641
642
643 @if (bol_backofficeLogged)
644 {
645 <div id="urlPath" class="text-center col-xs-12">
646 @Pageview.GlobalTags.GetTagByName("Global:Request.PathAndQuery").Value <br>
647 @Pageview.GlobalTags.GetTagByName("Global:Request.Url").Value
648 </div>
649 }
650 </div></body>
651 </html>
652
653 @SnippetStart("loginForm")
654 @{
655 string createAccountPage = GetString("Item.Area.CreateAccount");
656 string addUserPage = GetString("Item.Area.AddUser");
657 string loginPage = GetString("Item.Area.Login");
658 }
659 <form id="masterExtUserForm" class="col-xs-12 DMForms userRelatedForms hidden" action="/Default.aspx?ID=@Pageview.Page.ID" method="post">
660 <fieldset class="mandatory TextInput">
661 <label for="Username">@Translate("usernameEmail", "Username / Email")</label>
662 <input type="email" id="Username" name="username" value="" tabindex="1">
663 </fieldset>
664 <fieldset class="mandatory TextInput">
665 <label for="Password">@Translate("password", "Password")</label>
666 <input autocomplete="off" type="password" id="Password" name="password" value="" tabindex="2">
667 </fieldset>
668
669 <div class="col-xs-12 noPadding">
670 <input tabindex="3" class="btn btn-bg" name="LoginAction" type="submit" value='@Translate("Login", "Login")'>
671 </div>
672 <div class="forgotButtons col-xs-12 noPadding">
673 <a id="forgotPassword" href="@loginPage&LoginAction=Recovery">@Translate("forgotYourPassword", "Forgot your password?")</a>
674 </div>
675 <div id="dontHaveAnAccount" class="col-xs-12 noPadding">
676 <div>
677 @Translate("dontHaveAnAccount", "Don't have an account?")
678 <a href="@createAccountPage">@Translate("createAccount", "Create account")</a>
679 </div>
680 <div class="addNewAccount">
681 <a href="@addUserPage">@Translate("addUserToExistingAccount", "Add new user to an existing PBi account")</a>
682 </div>
683 </div>
684 </form>
685 @SnippetEnd("loginForm")