On-call Service:+45 70 24 45 18

Customer Service +45 70 20 04 11

AVN logo
Swift
Error executing template "Designs/Swift-v2/Paragraph/CustomIcons.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_45ebcac3e601443e8a75f22460c043ac.ExecuteAsync()
   at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass23_0.<Run>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   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.Products 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using Dynamicweb.Frontend 5 6 @{ 7 ProductViewModel product = null; 8 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 9 { 10 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 11 } 12 else if (Pageview.Page.Item["DummyProduct"] != null && Pageview.IsVisualEditorMode) 13 { 14 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 15 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 16 17 if (productList?.Products is object) 18 { 19 product = productList.Products[0]; 20 } 21 } 22 } 23 24 @if (product is object) 25 { 26 27 var iconDetails = Dynamicweb.Ecommerce.Services.Details.GetDetails(product.LanguageId, product.Id, product.VariantId, ""); 28 29 var groupedIcons = iconDetails 30 .Where(i => i.Value.Contains("AppIcons") || i.Value.Contains("PropIcons")) 31 .GroupBy(i => i.Value.Contains("AppIcons") ? "AppIcons" : "PropIcons") 32 .OrderBy(g => g.Key != "AppIcons"); 33 34 <div class="d-flex flex-column"> 35 @foreach(var iconGroup in groupedIcons) 36 { 37 <div class="d-flex flex-wrap mb-2"> 38 @foreach(var icon in iconGroup) 39 { 40 <img class="product-icon_image" src="@($"Admin/Public/GetImage.ashx?width=200&height=180&crop=5&Compression=75&DoNotUpscale=true&FillCanvas=true&image={icon.Value}")" /> 41 } 42 </div> 43 } 44 </div> 45 } 46 else if (Pageview.IsVisualEditorMode) 47 { 48 <div class="alert alert-dark m-0">@Translate("The details icons will be shown here, if any")</div> 49 }

Kundeservice +45 70 20 04 11

Error executing template "Designs/Swift-v2/Paragraph/CustomIcons.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_45ebcac3e601443e8a75f22460c043ac.ExecuteAsync()
   at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass23_0.<Run>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   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.Products 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using Dynamicweb.Frontend 5 6 @{ 7 ProductViewModel product = null; 8 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 9 { 10 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 11 } 12 else if (Pageview.Page.Item["DummyProduct"] != null && Pageview.IsVisualEditorMode) 13 { 14 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 15 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 16 17 if (productList?.Products is object) 18 { 19 product = productList.Products[0]; 20 } 21 } 22 } 23 24 @if (product is object) 25 { 26 27 var iconDetails = Dynamicweb.Ecommerce.Services.Details.GetDetails(product.LanguageId, product.Id, product.VariantId, ""); 28 29 var groupedIcons = iconDetails 30 .Where(i => i.Value.Contains("AppIcons") || i.Value.Contains("PropIcons")) 31 .GroupBy(i => i.Value.Contains("AppIcons") ? "AppIcons" : "PropIcons") 32 .OrderBy(g => g.Key != "AppIcons"); 33 34 <div class="d-flex flex-column"> 35 @foreach(var iconGroup in groupedIcons) 36 { 37 <div class="d-flex flex-wrap mb-2"> 38 @foreach(var icon in iconGroup) 39 { 40 <img class="product-icon_image" src="@($"Admin/Public/GetImage.ashx?width=200&height=180&crop=5&Compression=75&DoNotUpscale=true&FillCanvas=true&image={icon.Value}")" /> 41 } 42 </div> 43 } 44 </div> 45 } 46 else if (Pageview.IsVisualEditorMode) 47 { 48 <div class="alert alert-dark m-0">@Translate("The details icons will be shown here, if any")</div> 49 }

AVN Teknik

A world of technical solutions and tools

Technical solutions, tools and components for your business!

We want to improve your business through optimization solutions in your production. Our starting point is your needs ranging from rivets, hand tools, cutting and grinding tools, machining tools to complete assembly projects.

we know how

AVN Teknik offers you direct access to tools and components from over 60 international tool manufacturers and suppliers. We only work with international suppliers this is your guarantee for quality!

We offer

Own service workshop in Silkeborg and service technicians.
Over 30,000 item numbers in stock in Brøndby.
Skilled and experienced employees

Welcome to our five product groups!

AUTOMATION

Automation components and solutions to industry, medical- and food.

ASSEMBLING SOLUTIONS

Development of innovative assembly solutions used in the wind industry.

PRODUCTION

Walter cutting tools for drilling, milling and turning.

HAND TOOLS

Quality hand tools and tool wagons with your everyday tools.

GRINDING

Grinding and cutting tools for cutting, grinding, deburring and brushing.

Let our technical consultants advise you!

Many years of experience in optimizing the production process.