Error executing template "/Designs/Rapido/Paragraph/CasesContactFormContainer.cshtml" System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Exception of type 'System.InvalidOperationException' was thrown. at System.Runtime.CompilerServices.ConditionalWeakTable`2.VerifyIntegrity() at System.Runtime.CompilerServices.ConditionalWeakTable`2.TryGetValue(TKey key, TValue& value) at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetValue(TKey key, CreateValueCallback createValueCallback) at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetOrCreateValue(TKey key) at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode.GetStructure(SyntaxTrivia trivia) at Microsoft.CodeAnalysis.SyntaxTrivia.GetStructure() at Microsoft.CodeAnalysis.SyntaxNode.<DescendantTriviaIntoTrivia>d__171.MoveNext() at Microsoft.CodeAnalysis.SyntaxNodeOrToken.GetDirectives[TDirective](SyntaxNode node, Func`2 filter, List`1& directives) at Microsoft.CodeAnalysis.SyntaxNodeOrToken.GetDirectives[TDirective](SyntaxNodeOrToken& node, Func`2 filter, List`1& directives) at Microsoft.CodeAnalysis.CSharp.Syntax.NullableContextStateMap.GetContexts(SyntaxTree tree, Boolean isGeneratedCode) at Microsoft.CodeAnalysis.CSharp.Syntax.NullableContextStateMap.Create(SyntaxTree tree, Boolean isGeneratedCode) at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.EnsureNullableContextMapInitialized() at Microsoft.CodeAnalysis.CSharp.Binder.AreNullableAnnotationsEnabled(SyntaxTree syntaxTree, Int32 position) at Microsoft.CodeAnalysis.CSharp.Binder.AreNullableAnnotationsEnabled(SyntaxToken token) at Microsoft.CodeAnalysis.CSharp.Binder.BindNonGenericSimpleNamespaceOrTypeOrAliasSymbol(IdentifierNameSyntax node, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics, NamespaceOrTypeSymbol qualifierOpt) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeOrAliasSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.Imports.FromSyntax(CSharpSyntaxNode declarationSyntax, InContainerBinder binder, ConsList`1 basesBeingResolved, Boolean inUsing) at Microsoft.CodeAnalysis.CSharp.InContainerBinder.<>c__DisplayClass6_0.<.ctor>b__0(ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.InContainerBinder.GetImports(ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetImports(SingleNamespaceDeclaration declaration) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbol.ForceCompleteMemberByLocation(SourceLocation locationOpt, Symbol member, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.<>c__DisplayClass49_1.<ForceComplete>b__0(Int32 i) at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass6_0`1.<WithCurrentUICulture>b__0(T param) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbol.ForceCompleteMemberByLocation(SourceLocation locationOpt, Symbol member, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.<>c__DisplayClass49_1.<ForceComplete>b__0(Int32 i) at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass6_0`1.<WithCurrentUICulture>b__0(T param) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceModuleSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceAssemblySymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetSourceDeclarationDiagnostics(SyntaxTree syntaxTree, Nullable`1 filterSpanWithinTree, Func`4 locationFilterOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnostics(CompilationStage stage, Boolean includeEarlierStages, DiagnosticBag diagnostics, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.CompileMethods(CommonPEModuleBuilder moduleBuilder, Boolean emittingPdb, Boolean emitMetadataOnly, Boolean emitTestCoverageData, DiagnosticBag diagnostics, Predicate`1 filterOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream metadataPEStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, IMethodSymbol debugEntryPoint, Stream sourceLinkStream, IEnumerable`1 embeddedTexts, CompilationTestData testData, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, IMethodSymbol debugEntryPoint, Stream sourceLinkStream, IEnumerable`1 embeddedTexts, Stream metadataPEStream, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, CancellationToken cancellationToken) at RazorEngine.Roslyn.CSharp.RoslynCompilerServiceBase.CompileType(TypeContext context) at RazorEngine.Templating.RazorEngineCore.CreateTemplateType(ITemplateSource razorTemplate, Type modelType) at RazorEngine.Templating.RazorEngineCore.Compile(ITemplateKey key, Type modelType) at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType) at RazorEngine.Templating.RazorEngineService.GetCompiledTemplate(ITemplateKey key, Type modelType, Boolean compileOnCacheMiss) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.DynamicWrapperService.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 RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(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() ---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Exception of type 'System.InvalidOperationException' was thrown. at System.Runtime.CompilerServices.ConditionalWeakTable`2.VerifyIntegrity() at System.Runtime.CompilerServices.ConditionalWeakTable`2.TryGetValue(TKey key, TValue& value) at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetValue(TKey key, CreateValueCallback createValueCallback) at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetOrCreateValue(TKey key) at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode.GetStructure(SyntaxTrivia trivia) at Microsoft.CodeAnalysis.SyntaxTrivia.GetStructure() at Microsoft.CodeAnalysis.SyntaxNode.<DescendantTriviaIntoTrivia>d__171.MoveNext() at Microsoft.CodeAnalysis.SyntaxNodeOrToken.GetDirectives[TDirective](SyntaxNode node, Func`2 filter, List`1& directives) at Microsoft.CodeAnalysis.SyntaxNodeOrToken.GetDirectives[TDirective](SyntaxNodeOrToken& node, Func`2 filter, List`1& directives) at Microsoft.CodeAnalysis.CSharp.Syntax.NullableContextStateMap.GetContexts(SyntaxTree tree, Boolean isGeneratedCode) at Microsoft.CodeAnalysis.CSharp.Syntax.NullableContextStateMap.Create(SyntaxTree tree, Boolean isGeneratedCode) at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.EnsureNullableContextMapInitialized() at Microsoft.CodeAnalysis.CSharp.Binder.AreNullableAnnotationsEnabled(SyntaxTree syntaxTree, Int32 position) at Microsoft.CodeAnalysis.CSharp.Binder.AreNullableAnnotationsEnabled(SyntaxToken token) at Microsoft.CodeAnalysis.CSharp.Binder.BindNonGenericSimpleNamespaceOrTypeOrAliasSymbol(IdentifierNameSyntax node, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics, NamespaceOrTypeSymbol qualifierOpt) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeOrAliasSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.Imports.FromSyntax(CSharpSyntaxNode declarationSyntax, InContainerBinder binder, ConsList`1 basesBeingResolved, Boolean inUsing) at Microsoft.CodeAnalysis.CSharp.InContainerBinder.<>c__DisplayClass6_0.<.ctor>b__0(ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.InContainerBinder.GetImports(ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetImports(SingleNamespaceDeclaration declaration) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbol.ForceCompleteMemberByLocation(SourceLocation locationOpt, Symbol member, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.<>c__DisplayClass49_1.<ForceComplete>b__0(Int32 i) at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass6_0`1.<WithCurrentUICulture>b__0(T param) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbol.ForceCompleteMemberByLocation(SourceLocation locationOpt, Symbol member, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.<>c__DisplayClass49_1.<ForceComplete>b__0(Int32 i) at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass6_0`1.<WithCurrentUICulture>b__0(T param) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) ---> (Inner Exception #0) System.InvalidOperationException: Exception of type 'System.InvalidOperationException' was thrown. at System.Runtime.CompilerServices.ConditionalWeakTable`2.VerifyIntegrity() at System.Runtime.CompilerServices.ConditionalWeakTable`2.TryGetValue(TKey key, TValue& value) at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetValue(TKey key, CreateValueCallback createValueCallback) at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetOrCreateValue(TKey key) at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode.GetStructure(SyntaxTrivia trivia) at Microsoft.CodeAnalysis.SyntaxTrivia.GetStructure() at Microsoft.CodeAnalysis.SyntaxNode.<DescendantTriviaIntoTrivia>d__171.MoveNext() at Microsoft.CodeAnalysis.SyntaxNodeOrToken.GetDirectives[TDirective](SyntaxNode node, Func`2 filter, List`1& directives) at Microsoft.CodeAnalysis.SyntaxNodeOrToken.GetDirectives[TDirective](SyntaxNodeOrToken& node, Func`2 filter, List`1& directives) at Microsoft.CodeAnalysis.CSharp.Syntax.NullableContextStateMap.GetContexts(SyntaxTree tree, Boolean isGeneratedCode) at Microsoft.CodeAnalysis.CSharp.Syntax.NullableContextStateMap.Create(SyntaxTree tree, Boolean isGeneratedCode) at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.EnsureNullableContextMapInitialized() at Microsoft.CodeAnalysis.CSharp.Binder.AreNullableAnnotationsEnabled(SyntaxTree syntaxTree, Int32 position) at Microsoft.CodeAnalysis.CSharp.Binder.AreNullableAnnotationsEnabled(SyntaxToken token) at Microsoft.CodeAnalysis.CSharp.Binder.BindNonGenericSimpleNamespaceOrTypeOrAliasSymbol(IdentifierNameSyntax node, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics, NamespaceOrTypeSymbol qualifierOpt) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeOrAliasSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.Imports.FromSyntax(CSharpSyntaxNode declarationSyntax, InContainerBinder binder, ConsList`1 basesBeingResolved, Boolean inUsing) at Microsoft.CodeAnalysis.CSharp.InContainerBinder.<>c__DisplayClass6_0.<.ctor>b__0(ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.InContainerBinder.GetImports(ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetImports(SingleNamespaceDeclaration declaration) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbol.ForceCompleteMemberByLocation(SourceLocation locationOpt, Symbol member, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.<>c__DisplayClass49_1.<ForceComplete>b__0(Int32 i) at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass6_0`1.<WithCurrentUICulture>b__0(T param) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)<--- <---
1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 3 @{ 4 string image = String.Format("/Files/Images/Lauridsen/icons/icon-headset-white.svg", GetString("Item.Image")); 5 } 6 </section> 7 8 <section class="contact-form-full"> 9 <div class="contact-form-container js-target"> 10 <div class="grid grid--justify-center"> 11 <div class="grid__col--bleed"> 12 <h1 class="u-ta-center u-color-light">@GetString("Item.Headline")</h1> 13 <p class="u-ta-center u-margin-bottom">@GetString("Item.Subheader")</p> 14 <div class="grid__col-xlg-4 grid__col-lg-6 grid__col-sm-9 grid__col-md-7 cases-contact-form-container"> 15 @GetString("ParagraphModule") 16 <div class="form__field-group col-md-6 cases-info-text-container"> 17 @if (!string.IsNullOrEmpty(GetString("Item.Image"))) 18 { 19 <img class="grid__cell-img u-pull--left contact-form-img mr-3 b-lazy" src="/Files/Images/placeholder.gif" data-src="@image" alt="@GetString("Item.Image")" /> 20 } 21 <h3 class="u-color-light font-weight-bold">@GetString("Item.TextInfoHeader")</h3> 22 <div class="cases-text-info-subheader mt-1 ml-8">@GetString("Item.TextInfoSubheader")</div> 23 </div> 24 </div> 25 </div> 26 </div> 27 </div> 28 </section> 29 30
Error executing template "/Designs/Rapido/Paragraph/NZFullWidthParagraphContainer.cshtml" System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Exception of type 'System.InvalidOperationException' was thrown. at System.Runtime.CompilerServices.ConditionalWeakTable`2.VerifyIntegrity() at System.Runtime.CompilerServices.ConditionalWeakTable`2.TryGetValue(TKey key, TValue& value) at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetValue(TKey key, CreateValueCallback createValueCallback) at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetOrCreateValue(TKey key) at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode.GetStructure(SyntaxTrivia trivia) at Microsoft.CodeAnalysis.SyntaxTrivia.GetStructure() at Microsoft.CodeAnalysis.SyntaxNode.<DescendantTriviaIntoTrivia>d__171.MoveNext() at Microsoft.CodeAnalysis.SyntaxNodeOrToken.GetDirectives[TDirective](SyntaxNode node, Func`2 filter, List`1& directives) at Microsoft.CodeAnalysis.SyntaxNodeOrToken.GetDirectives[TDirective](SyntaxNodeOrToken& node, Func`2 filter, List`1& directives) at Microsoft.CodeAnalysis.CSharp.Syntax.NullableContextStateMap.GetContexts(SyntaxTree tree, Boolean isGeneratedCode) at Microsoft.CodeAnalysis.CSharp.Syntax.NullableContextStateMap.Create(SyntaxTree tree, Boolean isGeneratedCode) at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.EnsureNullableContextMapInitialized() at Microsoft.CodeAnalysis.CSharp.Binder.AreNullableAnnotationsEnabled(SyntaxTree syntaxTree, Int32 position) at Microsoft.CodeAnalysis.CSharp.Binder.AreNullableAnnotationsEnabled(SyntaxToken token) at Microsoft.CodeAnalysis.CSharp.Binder.BindNonGenericSimpleNamespaceOrTypeOrAliasSymbol(IdentifierNameSyntax node, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics, NamespaceOrTypeSymbol qualifierOpt) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeOrAliasSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.Imports.FromSyntax(CSharpSyntaxNode declarationSyntax, InContainerBinder binder, ConsList`1 basesBeingResolved, Boolean inUsing) at Microsoft.CodeAnalysis.CSharp.InContainerBinder.<>c__DisplayClass6_0.<.ctor>b__0(ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.InContainerBinder.GetImports(ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetImports(SingleNamespaceDeclaration declaration) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbol.ForceCompleteMemberByLocation(SourceLocation locationOpt, Symbol member, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.<>c__DisplayClass49_1.<ForceComplete>b__0(Int32 i) at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass6_0`1.<WithCurrentUICulture>b__0(T param) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbol.ForceCompleteMemberByLocation(SourceLocation locationOpt, Symbol member, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.<>c__DisplayClass49_1.<ForceComplete>b__0(Int32 i) at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass6_0`1.<WithCurrentUICulture>b__0(T param) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceModuleSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceAssemblySymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetSourceDeclarationDiagnostics(SyntaxTree syntaxTree, Nullable`1 filterSpanWithinTree, Func`4 locationFilterOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnostics(CompilationStage stage, Boolean includeEarlierStages, DiagnosticBag diagnostics, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.CompileMethods(CommonPEModuleBuilder moduleBuilder, Boolean emittingPdb, Boolean emitMetadataOnly, Boolean emitTestCoverageData, DiagnosticBag diagnostics, Predicate`1 filterOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream metadataPEStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, IMethodSymbol debugEntryPoint, Stream sourceLinkStream, IEnumerable`1 embeddedTexts, CompilationTestData testData, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, IMethodSymbol debugEntryPoint, Stream sourceLinkStream, IEnumerable`1 embeddedTexts, Stream metadataPEStream, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, CancellationToken cancellationToken) at RazorEngine.Roslyn.CSharp.RoslynCompilerServiceBase.CompileType(TypeContext context) at RazorEngine.Templating.RazorEngineCore.CreateTemplateType(ITemplateSource razorTemplate, Type modelType) at RazorEngine.Templating.RazorEngineCore.Compile(ITemplateKey key, Type modelType) at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType) at RazorEngine.Templating.RazorEngineService.GetCompiledTemplate(ITemplateKey key, Type modelType, Boolean compileOnCacheMiss) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.DynamicWrapperService.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 RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(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() ---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Exception of type 'System.InvalidOperationException' was thrown. at System.Runtime.CompilerServices.ConditionalWeakTable`2.VerifyIntegrity() at System.Runtime.CompilerServices.ConditionalWeakTable`2.TryGetValue(TKey key, TValue& value) at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetValue(TKey key, CreateValueCallback createValueCallback) at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetOrCreateValue(TKey key) at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode.GetStructure(SyntaxTrivia trivia) at Microsoft.CodeAnalysis.SyntaxTrivia.GetStructure() at Microsoft.CodeAnalysis.SyntaxNode.<DescendantTriviaIntoTrivia>d__171.MoveNext() at Microsoft.CodeAnalysis.SyntaxNodeOrToken.GetDirectives[TDirective](SyntaxNode node, Func`2 filter, List`1& directives) at Microsoft.CodeAnalysis.SyntaxNodeOrToken.GetDirectives[TDirective](SyntaxNodeOrToken& node, Func`2 filter, List`1& directives) at Microsoft.CodeAnalysis.CSharp.Syntax.NullableContextStateMap.GetContexts(SyntaxTree tree, Boolean isGeneratedCode) at Microsoft.CodeAnalysis.CSharp.Syntax.NullableContextStateMap.Create(SyntaxTree tree, Boolean isGeneratedCode) at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.EnsureNullableContextMapInitialized() at Microsoft.CodeAnalysis.CSharp.Binder.AreNullableAnnotationsEnabled(SyntaxTree syntaxTree, Int32 position) at Microsoft.CodeAnalysis.CSharp.Binder.AreNullableAnnotationsEnabled(SyntaxToken token) at Microsoft.CodeAnalysis.CSharp.Binder.BindNonGenericSimpleNamespaceOrTypeOrAliasSymbol(IdentifierNameSyntax node, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics, NamespaceOrTypeSymbol qualifierOpt) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeOrAliasSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.Imports.FromSyntax(CSharpSyntaxNode declarationSyntax, InContainerBinder binder, ConsList`1 basesBeingResolved, Boolean inUsing) at Microsoft.CodeAnalysis.CSharp.InContainerBinder.<>c__DisplayClass6_0.<.ctor>b__0(ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.InContainerBinder.GetImports(ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetImports(SingleNamespaceDeclaration declaration) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbol.ForceCompleteMemberByLocation(SourceLocation locationOpt, Symbol member, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.<>c__DisplayClass49_1.<ForceComplete>b__0(Int32 i) at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass6_0`1.<WithCurrentUICulture>b__0(T param) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbol.ForceCompleteMemberByLocation(SourceLocation locationOpt, Symbol member, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.<>c__DisplayClass49_1.<ForceComplete>b__0(Int32 i) at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass6_0`1.<WithCurrentUICulture>b__0(T param) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) ---> (Inner Exception #0) System.InvalidOperationException: Exception of type 'System.InvalidOperationException' was thrown. at System.Runtime.CompilerServices.ConditionalWeakTable`2.VerifyIntegrity() at System.Runtime.CompilerServices.ConditionalWeakTable`2.TryGetValue(TKey key, TValue& value) at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetValue(TKey key, CreateValueCallback createValueCallback) at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetOrCreateValue(TKey key) at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode.GetStructure(SyntaxTrivia trivia) at Microsoft.CodeAnalysis.SyntaxTrivia.GetStructure() at Microsoft.CodeAnalysis.SyntaxNode.<DescendantTriviaIntoTrivia>d__171.MoveNext() at Microsoft.CodeAnalysis.SyntaxNodeOrToken.GetDirectives[TDirective](SyntaxNode node, Func`2 filter, List`1& directives) at Microsoft.CodeAnalysis.SyntaxNodeOrToken.GetDirectives[TDirective](SyntaxNodeOrToken& node, Func`2 filter, List`1& directives) at Microsoft.CodeAnalysis.CSharp.Syntax.NullableContextStateMap.GetContexts(SyntaxTree tree, Boolean isGeneratedCode) at Microsoft.CodeAnalysis.CSharp.Syntax.NullableContextStateMap.Create(SyntaxTree tree, Boolean isGeneratedCode) at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.EnsureNullableContextMapInitialized() at Microsoft.CodeAnalysis.CSharp.Binder.AreNullableAnnotationsEnabled(SyntaxTree syntaxTree, Int32 position) at Microsoft.CodeAnalysis.CSharp.Binder.AreNullableAnnotationsEnabled(SyntaxToken token) at Microsoft.CodeAnalysis.CSharp.Binder.BindNonGenericSimpleNamespaceOrTypeOrAliasSymbol(IdentifierNameSyntax node, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics, NamespaceOrTypeSymbol qualifierOpt) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeOrAliasSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved, Boolean suppressUseSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, DiagnosticBag diagnostics, ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.Imports.FromSyntax(CSharpSyntaxNode declarationSyntax, InContainerBinder binder, ConsList`1 basesBeingResolved, Boolean inUsing) at Microsoft.CodeAnalysis.CSharp.InContainerBinder.<>c__DisplayClass6_0.<.ctor>b__0(ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.InContainerBinder.GetImports(ConsList`1 basesBeingResolved) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetImports(SingleNamespaceDeclaration declaration) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbol.ForceCompleteMemberByLocation(SourceLocation locationOpt, Symbol member, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.<>c__DisplayClass49_1.<ForceComplete>b__0(Int32 i) at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass6_0`1.<WithCurrentUICulture>b__0(T param) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)<--- <---
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 3 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 4 @using Dynamicweb.Frontend 5 6 @helper RenderContent(ItemViewModel item, bool isCarousel = false) 7 { 8 string cardClass = item.GetBoolean("ShowAsCard") ? "paragraph-card" : "grid__cell"; 9 cardClass = Pageview.Device.ToString() != "Tablet" ? cardClass : "grid__cell"; 10 11 if (item.GetList("ContentPositions").SelectedValue == "image-top" || item.GetList("ContentPositions").SelectedValue == "image-centered" || string.IsNullOrEmpty(item.GetList("ContentPositions").SelectedValue)) 12 { 13 <div class="@cardClass"> 14 @RenderImage(item, isCarousel) 15 @RenderHeading(item) 16 @RenderText(item) 17 @RenderModule(item) 18 </div> 19 @RenderButton(item) 20 } 21 22 if (item.GetList("ContentPositions").SelectedValue == "title-top") 23 { 24 <div class="@cardClass"> 25 @RenderHeading(item) 26 @RenderImage(item, isCarousel) 27 @RenderText(item) 28 @RenderModule(item) 29 </div> 30 @RenderButton(item) 31 } 32 33 if (item.GetList("ContentPositions").SelectedValue == "image-left") 34 { 35 <div class="grid"> 36 <div class="grid__col-3"> 37 @RenderImage(item, isCarousel) 38 </div> 39 <div class="grid__col-9"> 40 @RenderHeading(item) 41 @RenderText(item) 42 @RenderModule(item) 43 @RenderButton(item) 44 </div> 45 </div> 46 } 47 48 if (item.GetList("ContentPositions").SelectedValue == "all-centered") 49 { 50 <div class="u-ta-center @cardClass"> 51 @RenderImage(item, isCarousel) 52 @RenderHeading(item) 53 @RenderText(item) 54 @RenderModule(item) 55 </div> 56 @RenderButton(item) 57 } 58 59 if (item.GetList("ContentPositions").SelectedValue == "middle-center") 60 { 61 <div class="u-ta-center u-middle"> 62 <div class="@cardClass"> 63 @RenderImage(item, isCarousel) 64 @RenderHeading(item) 65 @RenderText(item) 66 @RenderModule(item) 67 </div> 68 @RenderButton(item) 69 </div> 70 } 71 72 if (item.GetList("ContentPositions").SelectedValue == "middle-left") 73 { 74 <div class="grid__cell u-middle"> 75 <div class="@cardClass"> 76 @RenderImage(item, isCarousel) 77 @RenderHeading(item) 78 @RenderText(item) 79 @RenderModule(item) 80 </div> 81 @RenderButton(item) 82 </div> 83 } 84 } 85 86 @helper RenderHeading(ItemViewModel item) 87 { 88 if (item.GetBoolean("ShowTitle") != false && !string.IsNullOrEmpty(item.GetString("Title"))) 89 { 90 string headerMargin = item.GetString("Text") != "" && item.GetString("Image") != "" ? "u-margin-bottom" : ""; 91 headerMargin = Model.GetModuleOutput() == "" ? headerMargin : "u-margin-bottom"; 92 string url = item.GetString("Link"); 93 94 if (!String.IsNullOrEmpty(url)) 95 { 96 <a href="@url"> 97 <h1 class="@headerMargin">@item.GetString("Title")</h1> 98 </a> 99 } 100 else 101 { 102 <h1 class="@headerMargin">@item.GetString("Title")</h1> 103 } 104 } 105 } 106 107 @helper RenderButton(ItemViewModel item) 108 { 109 string url = item.GetString("Link"); 110 string linkText = item.GetString("LinkText"); 111 string footerCssClass = ""; 112 string cardFooterClass = item.GetBoolean("ShowAsCard") ? "paragraph-card-footer" : "grid__cell-footer d-block"; 113 cardFooterClass = Pageview.Device.ToString() != "Tablet" ? cardFooterClass : ""; 114 115 if (item.GetList("ContentPositions").SelectedValue == "all-centered" || item.GetList("ContentPositions").SelectedValue == "middle-center") { 116 footerCssClass = "grid--justify-center"; 117 } 118 119 if (!string.IsNullOrEmpty(url) && !string.IsNullOrEmpty(linkText)) 120 { 121 string buttonStyle = !String.IsNullOrEmpty(item.GetList("ButtonDesign").SelectedValue) ? item.GetList("ButtonDesign").SelectedValue : "primary"; 122 123 <div class="@footerCssClass @cardFooterClass"> 124 <div class="u-margin-top u-margin-bottom"> 125 @if (url.Contains("http")) 126 { 127 <a href="@url" class="btn btn--@buttonStyle dw-mod" target="_blank">@linkText</a> 128 } 129 else if (url.Contains("/")) 130 { 131 <a href="@url" class="btn btn--@buttonStyle dw-mod" download>@linkText</a> 132 } 133 else 134 { 135 <a href="@url" class="btn btn--@buttonStyle dw-mod">@linkText</a> 136 } 137 </div> 138 </div> 139 } else { 140 <div class="grid__cell-footer @footerCssClass @cardFooterClass"></div> 141 } 142 } 143 144 @helper RenderText(ItemViewModel item) 145 { 146 if (!string.IsNullOrWhiteSpace(item.GetString("Text"))) 147 { 148 @item.GetString("Text") 149 } 150 } 151 152 @helper RenderModule(ItemViewModel item) 153 { 154 @Model.GetModuleOutput(); 155 } 156 157 @helper RenderImage(ItemViewModel item, bool isCarousel) 158 { 159 if (!string.IsNullOrEmpty(item.GetString("Image")) && item.GetList("ImageStyle").SelectedValue != "background") 160 { 161 string url = item.GetString("Link"); 162 163 <div class="u-margin-bottom"> 164 @if (!String.IsNullOrEmpty(url)) 165 { 166 <a href="@url"> 167 @RenderImageElement(item, isCarousel) 168 </a> 169 } 170 else 171 { 172 @RenderImageElement(item, isCarousel) 173 } 174 </div> 175 } 176 } 177 178 @helper RenderImageElement(ItemViewModel item, bool isCarousel) 179 { 180 string image = item.GetFile("Image") != null ? System.Web.HttpContext.Current.Server.UrlEncode(item.GetFile("Image").Path) : ""; 181 string altText = item.GetString("Title"); 182 string imgCssClass = ""; 183 string imgCrop = !string.IsNullOrEmpty(item.GetList("ImageCrop").SelectedValue) ? item.GetList("ImageCrop").SelectedValue : "5"; 184 string imageBoxWidth = "480"; 185 int imageWidth = Int32.Parse(item.GetList("Width").SelectedValue) < 8 ? 496 : 992; 186 int imageHeight = Int32.Parse(item.GetList("Width").SelectedValue) < 8 ? 380 : 760; 187 string placeHolderImage = "/Files/Images/placeholder.gif"; 188 189 if (item.GetList("ContentPositions").SelectedValue == "image-centered" || item.GetList("ContentPositions").SelectedValue == "all-centered" || item.GetList("ContentPositions").SelectedValue == "middle-center") 190 { 191 imgCssClass = "grid__cell-img--centered"; 192 } 193 194 if (item.GetList("ImageStyle").SelectedValue == "ball") 195 { 196 imgCssClass += " grid__cell-img--ball"; 197 if (!isCarousel) 198 { 199 <img class="grid__cell-img @imgCssClass b-lazy" src="@placeHolderImage" data-src="/Admin/Public/GetImage.ashx?width=@imageBoxWidth&height=@imageBoxWidth&crop=@imgCrop&Compression=75&DoNotUpscale=true&FillCanvas=true&image=@image" alt="@altText"> 200 } 201 else 202 { 203 <img class="grid__cell-img @imgCssClass" src="/Admin/Public/GetImage.ashx?width=@imageBoxWidth&height=@imageBoxWidth&crop=@imgCrop&Compression=75&DoNotUpscale=true&image=@image" alt="@altText"> 204 } 205 } 206 else 207 { 208 string largeImage = "/Admin/Public/GetImage.ashx?width=" + imageWidth + "&height=" + imageHeight + "&crop=" + imgCrop + "&Compression=75&FillCanvas=true&DoNotUpscale=true&image=" + image; 209 string smallImage = "/Admin/Public/GetImage.ashx?width=" + imageWidth/2 + "&height=" + imageHeight/2 + "&crop=" + imgCrop + "&Compression=75&DoNotUpscale=true&FillCanvas=true&image=" + image; 210 211 if (!isCarousel) 212 { 213 <img class="@imgCssClass b-lazy" src="@placeHolderImage" data-src="@largeImage" data-src-small="@smallImage" alt="@altText"> 214 } 215 else 216 { 217 <img class="@imgCssClass" src="@largeImage" alt="@altText"> 218 } 219 } 220 } 221 222 @{ 223 string fontColor = !string.IsNullOrEmpty(Model.Item.GetList("FontColor").SelectedValue) ? "u-" + Model.Item.GetList("FontColor").SelectedValue : ""; 224 string backgroundColor = !string.IsNullOrEmpty(Model.Item.GetList("BackgroundColor").SelectedValue) ? "u-" + Model.Item.GetList("BackgroundColor").SelectedValue + "--bg" : ""; 225 string paragraphContainerClasses = ""; 226 string containerClasses = string.IsNullOrEmpty(Model.Item.GetList("Width").SelectedValue) ? "center-container dw-mod" : ""; 227 string gridClasses = "grid"; 228 string spacingSize = Model.Item.GetList("Spacing") != null && Model.Item.GetList("Spacing").SelectedValue != "" ? Model.Item.GetList("Spacing").SelectedValue : "lg"; 229 bool isCenter = Model.Item.GetBoolean("CenterContent"); 230 231 int columnCount = 0; 232 int paragraphCount = 0; 233 int totalParagraphs = Model.Item.GetItems("Paragraph").Count; 234 int totalSlides = 1; 235 236 if (Model.Item.GetList("Width").SelectedValue == "center") { 237 containerClasses = fontColor + " " + backgroundColor + " center-container"; 238 } 239 240 if (Model.Item.GetList("Width").SelectedValue == "full") 241 { 242 containerClasses = fontColor + " " + backgroundColor; 243 } 244 245 if (Model.Item.GetList("Width").SelectedValue == "combi") 246 { 247 paragraphContainerClasses = @fontColor + " " + @backgroundColor; 248 containerClasses = "center-container"; 249 } 250 251 string fullBackgroundImage = ""; 252 if (Model.Item.GetFile("BackgroundImage") != null) 253 { 254 fullBackgroundImage = "background-image:url(/Admin/Public/GetImage.ashx?width=2500&height=1100&crop=0&Compression=85&DoNotUpscale=true&image=" + Model.Item.GetFile("BackgroundImage").Path + ");"; 255 fullBackgroundImage += " background-position: center center; background-size: cover; "; 256 } else if (string.IsNullOrEmpty(Model.Item.GetList("BackgroundColor").SelectedValue)) { 257 backgroundColor = "u-color-light--bg"; 258 gridClasses += " "; 259 } 260 261 if (Model.Item.GetBoolean("SeperationLineAfter") && Model.Item.GetList("Width").SelectedValue != "center") { 262 paragraphContainerClasses += " multiple-paragraphs-container--seperation-line-after"; 263 } else if (Model.Item.GetBoolean("SeperationLineAfter")) { 264 containerClasses += " multiple-paragraphs-container--seperation-line-after"; 265 } 266 267 gridClasses += !string.IsNullOrEmpty(Model.Item.GetList("Height").SelectedValue) ? " paragraph-container--height-" + Model.Item.GetList("Height").SelectedValue : ""; 268 269 string containerId = "Paragraph_" + Model.ID; 270 string carouselContainerClass = ""; 271 string carouselSlideClass = ""; 272 273 //Set as carousel 274 if (Model.Item.GetBoolean("EnableCarousel")) { 275 containerClasses += " carousel js-carousel-container"; 276 carouselContainerClass += "carousel__container dw-mod"; 277 carouselSlideClass += "carousel__container__slide dw-mod"; 278 containerId = "Carousel_" + Model.ID; 279 } 280 } 281 282 <section class="multiple-paragraphs-container @paragraphContainerClasses multiple-paragraphs-container--spacing-@spacingSize dw-mod grid__col-12" style="@fullBackgroundImage"> 283 <div class="@containerClasses dw-mod @(isCenter ? "text-center" : "")" id="@containerId"> 284 <div class="@carouselContainerClass"> 285 <div class="@carouselSlideClass"> 286 <div class="@gridClasses"> 287 @foreach (var paragraph in Model.Item.GetItems("Paragraph")) 288 { 289 int columnWidth = Pageview.Device.ToString() != "Mobile" ? Int32.Parse(paragraph.GetList("Width").SelectedValue) : 12; 290 if (columnCount < 12) 291 { 292 columnCount += columnWidth; 293 } 294 else 295 { 296 columnCount = columnWidth; 297 } 298 299 string columnCssClasses = "grid__col-md-" + columnWidth + " grid__col-xs-" + paragraph.GetList("WidthMobile").SelectedValue; 300 string backgroundImage = ""; 301 string imageStyle = paragraph.GetList("ImageStyle").SelectedValue; 302 303 if (paragraph.GetString("WidthMobile") == "hide") 304 { 305 columnCssClasses = "grid__col-md-" + columnWidth + " grid__col-xs--hidden"; 306 } 307 308 if (imageStyle == "background" && paragraph.GetFile("Image") != null) 309 { 310 columnCssClasses += " grid__col--bg"; 311 string cropMode = paragraph.GetList("ImageCrop").SelectedValue != null ? paragraph.GetList("ImageCrop").SelectedValue : "0"; 312 backgroundImage = "background-image:url(/Admin/Public/GetImage.ashx?width=2500&height=1100&crop=" + cropMode + "&Compression=85&DoNotUpscale=true&image=" + paragraph.GetFile("Image").Path + ");"; 313 } 314 315 <div class="@columnCssClasses paragraph-container m-auto" style="@backgroundImage"> 316 @RenderContent(paragraph, Model.Item.GetBoolean("EnableCarousel")) 317 </div> 318 319 paragraphCount++; 320 if (paragraphCount != totalParagraphs) { 321 string breakMarkup = string.Empty; 322 if (columnCount == 12) 323 { 324 breakMarkup = "</div></div><div class=\"" + carouselSlideClass + "\"><div class=\"" + gridClasses + "\">"; 325 totalSlides++; 326 } 327 @breakMarkup 328 } 329 } 330 </div> 331 </div> 332 </div> 333 334 @if (Model.Item.GetBoolean("EnableCarousel") && totalSlides > 1) 335 { 336 <div class="js-carousel-data" data-total-slides="@totalSlides" data-carousel-slide-time="@Model.Item.GetString("SlideTime")"> 337 <div class="carousel-prev-btn dw-mod" onclick="Carousel.GetPreviousSlide(this)"></div> 338 <div class="carousel-next-btn dw-mod" onclick="Carousel.GetNextSlide(this)"></div> 339 </div> 340 } 341 </div> 342 </section>