BRABANTIA BREAD KNIFE, TASTY+ - DARK GREY
0223883
The Brabantia Bread Knife is cut out for bread lovers. The long blade of high-quality steel has serrations and easily cuts through the hardest crust without squishing your slices. Easy to clean and durable - cutting edge design!
Error executing template "Designs/Swift/Paragraph/Swift_ProductFieldDisplayGroupsAccordion.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_67f2a53e8a2f4d9db888138f1ce89d20.GetDisplayGroups(ProductViewModel product) in D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\Swift_ProductFieldDisplayGroupsAccordion.cshtml:line 44 at CompiledRazorTemplates.Dynamic.RazorEngine_67f2a53e8a2f4d9db888138f1ce89d20.GetContentSettings(ProductViewModel product) in D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\Swift_ProductFieldDisplayGroupsAccordion.cshtml:line 33 at CompiledRazorTemplates.Dynamic.RazorEngine_67f2a53e8a2f4d9db888138f1ce89d20.Execute() in D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\Swift_ProductFieldDisplayGroupsAccordion.cshtml:line 92 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 @using System.Linq 4 5 @functions { 6 7 class ContentSetting 8 { 9 public FieldGroupViewModel FieldDisplayGroup { get; set; } 10 public string LayoutPath { get; set; } 11 12 public ContentSetting(FieldGroupViewModel fieldDisplayGroup, string layoutPath) 13 { 14 FieldDisplayGroup = fieldDisplayGroup; 15 LayoutPath = GetLayoutPathFormatted(layoutPath); 16 } 17 } 18 19 ProductViewModel GetProduct() 20 { 21 ProductViewModel product = null; 22 23 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 24 { 25 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 26 } 27 28 return product; 29 } 30 31 List<ContentSetting> GetContentSettings(ProductViewModel product) 32 { 33 var displayGroups = GetDisplayGroups(product); 34 string defaultLayout = Model.Item.GetRawValueString("Layout", "list"); 35 var contentSettings = displayGroups.Select(displayGroup => new ContentSetting(displayGroup, defaultLayout)).ToList(); 36 bool layoutsCustomized = Model.Item.GetBoolean("CustomizeLayouts"); 37 38 return layoutsCustomized ? GetContentSettingsCustomizedLayoutSelection(contentSettings) : contentSettings; 39 } 40 41 List<FieldGroupViewModel> GetDisplayGroups(ProductViewModel product) 42 { 43 44 bool hideFieldsWithZeroValue = Model.Item.GetBoolean("HideFieldsWithZeroValue"); 45 var selectedDisplayGroupSystemName = Model.Item.GetList("FieldDisplayGroups")?.GetRawValue().OfType<string>(); 46 var displayGroups = product.GetProductDisplayGroupFieldsByGroupSystemNames(selectedDisplayGroupSystemName, hideFieldsWithZeroValue); 47 48 return displayGroups.ToList(); 49 } 50 51 List<ContentSetting> GetContentSettingsCustomizedLayoutSelection(List<ContentSetting> contentSettings) 52 { 53 var selections = Model.Item.GetItems("FieldDisplayGroupLayoutSelector"); 54 55 foreach (var contentSetting in contentSettings) 56 { 57 foreach (var selection in selections) 58 { 59 string displayGroupSystemName = string.Empty; 60 string layoutPath = string.Empty; 61 62 foreach (var field in selection.Fields) 63 { 64 displayGroupSystemName = field.SystemName == "FieldDisplayGroups" ? field.GetRawValueString() : displayGroupSystemName; 65 layoutPath = field.SystemName == "Layout" ? field.GetRawValueString() : layoutPath; 66 } 67 68 if (displayGroupSystemName == contentSetting.FieldDisplayGroup.SystemName) 69 { 70 contentSetting.LayoutPath = GetLayoutPathFormatted(layoutPath); 71 } 72 } 73 } 74 75 return contentSettings; 76 } 77 78 public static string GetLayoutPathFormatted(string layout) 79 { 80 string layoutPathInCapitalCase = layout[0].ToString().ToUpper() + layout.Substring(1); 81 return $"Components/Specifications/{layoutPathInCapitalCase}.cshtml"; 82 } 83 84 } 85 86 @{ 87 var product = GetProduct(); 88 89 if (product is object) 90 { 91 92 var accordionContentSettings = GetContentSettings(product); 93 94 string title = Model.Item.GetString("Title"); 95 bool hideLabels = Model.Item.GetBoolean("HideFieldLabels"); 96 bool hideTitle = Model.Item.GetBoolean("HideTitle"); 97 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "display-4"); 98 var templateParams = new Dictionary<string, object> 99 { 100 {"Size", "compact" }, 101 //Hide title and group headers only apply to the accordion layout, not its tab content layouts 102 { "HideGroupHeaders", true }, 103 { "HideTitle", true } 104 }; 105 106 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 107 string gapCss = "gap-2"; 108 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 109 contentPadding = contentPadding == "none" ? string.Empty : contentPadding; 110 contentPadding = contentPadding == "small" ? " p-2 p-md-3" : contentPadding; 111 contentPadding = contentPadding == "large" ? " p-4 p-md-5" : contentPadding; 112 113 <div class="h-100@(theme)@(contentPadding) item_@Model.Item.SystemName.ToLower()"> 114 <div class="grid @(gapCss)"> 115 @if (!hideTitle) 116 { 117 <h2 class="g-col-12 @titleFontSize">@Model.Item.GetString("Title")</h2> 118 } 119 <div class="g-col-12"> 120 <div class="accordion accordion-flush w-100" id="Specifications_@Model.ID"> 121 @foreach (var contentSetting in accordionContentSettings) 122 { 123 var id = Guid.NewGuid().ToString(); 124 string groupHeadingId = $"SpecificationHeading_{Model.ID}_{id}"; 125 string groupItemId = $"SpecificationItem_{Model.ID}_{id}"; 126 127 <div class="accordion-item"> 128 <h2 class="accordion-header" id="@groupHeadingId"> 129 <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#@groupItemId" aria-expanded="false" aria-controls="@groupItemId"> 130 @contentSetting.FieldDisplayGroup.Name 131 </button> 132 </h2> 133 134 <div id="@groupItemId" class="accordion-collapse collapse" aria-labelledby="@groupHeadingId" data-bs-parent="#Specifications_@Model.ID"> 135 <div class="accordion-body"> 136 <div class="g-col-12"> 137 <dl class="grid @(gapCss)"> 138 @{ 139 templateParams["Groups"] = new List<FieldGroupViewModel> { contentSetting.FieldDisplayGroup }; 140 @RenderPartial(contentSetting.LayoutPath, Model, templateParams); 141 } 142 </dl> 143 </div> 144 </div> 145 </div> 146 </div> 147 } 148 </div> 149 </div> 150 </div> 151 </div> 152 } 153 else 154 { 155 <div class="alert alert-warning m-0">@Translate("Product Specification will be shown here if any")</div> 156 } 157 } 158
In stock
-
•Handy - ideal for cutting bread or other products with a hard crust and a soft interior.•Good grip - ergonomic design.•Sharp for longer - blade made of high-quality steel.•Finger friendly - handle with integrated finger guard.•Problem-free use - 5 year guarantee and service.•More sustainable choice - made from 38% recycled material, 100% recyclable after use.•Expandable - part of the Brabantia Tasty+ collection.
Product Details
- Barcode
- 8710755120626
- Brand
- Brabantia
- On Offer
- No
- Supplier Item
- 120626
- Color
- Grey
- Category
- Knives
- Dimensions
- 38 x 330 x 20 mm
- Material
- Plastic & Steel
- Weight
- 0,095 kg
Similar Products
You may also like