Error executing template "Designs/Bolind/Paragraph/Basic_Cards.cshtml"
System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at CompiledRazorTemplates.Dynamic.RazorEngine_ab586d04fad5409c9396b8fafa0401b2.Execute() in E:\Solutions\Bolind\Web\Test\Files\Templates\Designs\Bolind\Paragraph\Basic_Cards.cshtml:line 10
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Bolind.Web.CustomCode.CDN
2 @using Dynamicweb.Frontend;
3
4 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
5
6 @{
7 var items = Model.Item.GetItems("Items");
8 }
9
10 @if (Model.Item.GetItems("Items").Any())
11 {
12 <section class="cards-component">
13 <div class="cards-component__wrapper cards-component__wrapper-count--@Model.Item.GetItems("Items").Count()">
14 @foreach (var item in Model.Item.GetItems("Items"))
15 {
16 string cardTitle = item.GetString("Title");
17 string cardImagePath = item.GetFile("Image") != null ? Pageview.CdnWrap(item.GetFile("Image").Path) : "";
18 string cardLink = item.GetString("Link");
19 string textColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Color").SelectedValue) ? item.GetValue<ListViewModel>("Text_Color").SelectedValue : "dark";
20 string textPosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Position").SelectedValue) ? item.GetValue<ListViewModel>("Text_Position").SelectedValue : "bottom-left";
21 string circleColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Color").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Color").SelectedValue : string.Empty;
22 string circlePosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Position").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Position").SelectedValue : "top-right";
23 bool useGradient = item.GetBoolean("Use_Gradient");
24
25 <article class="card-component-item card-component-item--@textColor @(string.IsNullOrEmpty(cardImagePath) ? "card-component-item--no-bg" : string.Empty) @(!string.IsNullOrEmpty(cardLink) ? "card-component-item--has-link" : string.Empty) @(useGradient ? "card-component-item--gradient" : string.Empty)">
26 @if (!string.IsNullOrEmpty(cardImagePath))
27 {
28 <div class="card-component-item__bg" style="background-image:url('@cardImagePath');"></div>
29 }
30
31 <div class="card-component-item__inner card-component-item__inner--@textPosition">
32 @if (!string.IsNullOrEmpty(cardTitle))
33 {
34 <h4 class="card-component-item__title card-component-item__title--@textColor">@Raw(cardTitle.Replace("\\n", "<br />"))</h4>
35 }
36
37 @if (!string.IsNullOrEmpty(cardLink))
38 {
39 <a class="card-component-item__link" href="@cardLink" aria-label="@cardLink"></a>
40 }
41 </div>
42
43 @if (!string.IsNullOrEmpty(circleColor))
44 {
45 <div class="card-component-item__circle card-component-item__circle--@circleColor card-component-item__circle--@circlePosition"></div>
46 }
47 </article>
48 }
49 </div>
50 </section>
51 }
Error executing template "Designs/Bolind/Paragraph/Basic_Cards.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_ab586d04fad5409c9396b8fafa0401b2.Execute() in E:\Solutions\Bolind\Web\Test\Files\Templates\Designs\Bolind\Paragraph\Basic_Cards.cshtml:line 7
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Bolind.Web.CustomCode.CDN
2 @using Dynamicweb.Frontend;
3
4 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
5
6 @{
7 var items = Model.Item.GetItems("Items");
8 }
9
10 @if (Model.Item.GetItems("Items").Any())
11 {
12 <section class="cards-component">
13 <div class="cards-component__wrapper cards-component__wrapper-count--@Model.Item.GetItems("Items").Count()">
14 @foreach (var item in Model.Item.GetItems("Items"))
15 {
16 string cardTitle = item.GetString("Title");
17 string cardImagePath = item.GetFile("Image") != null ? Pageview.CdnWrap(item.GetFile("Image").Path) : "";
18 string cardLink = item.GetString("Link");
19 string textColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Color").SelectedValue) ? item.GetValue<ListViewModel>("Text_Color").SelectedValue : "dark";
20 string textPosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Position").SelectedValue) ? item.GetValue<ListViewModel>("Text_Position").SelectedValue : "bottom-left";
21 string circleColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Color").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Color").SelectedValue : string.Empty;
22 string circlePosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Position").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Position").SelectedValue : "top-right";
23 bool useGradient = item.GetBoolean("Use_Gradient");
24
25 <article class="card-component-item card-component-item--@textColor @(string.IsNullOrEmpty(cardImagePath) ? "card-component-item--no-bg" : string.Empty) @(!string.IsNullOrEmpty(cardLink) ? "card-component-item--has-link" : string.Empty) @(useGradient ? "card-component-item--gradient" : string.Empty)">
26 @if (!string.IsNullOrEmpty(cardImagePath))
27 {
28 <div class="card-component-item__bg" style="background-image:url('@cardImagePath');"></div>
29 }
30
31 <div class="card-component-item__inner card-component-item__inner--@textPosition">
32 @if (!string.IsNullOrEmpty(cardTitle))
33 {
34 <h4 class="card-component-item__title card-component-item__title--@textColor">@Raw(cardTitle.Replace("\\n", "<br />"))</h4>
35 }
36
37 @if (!string.IsNullOrEmpty(cardLink))
38 {
39 <a class="card-component-item__link" href="@cardLink" aria-label="@cardLink"></a>
40 }
41 </div>
42
43 @if (!string.IsNullOrEmpty(circleColor))
44 {
45 <div class="card-component-item__circle card-component-item__circle--@circleColor card-component-item__circle--@circlePosition"></div>
46 }
47 </article>
48 }
49 </div>
50 </section>
51 }
Error executing template "Designs/Bolind/Paragraph/Hero.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_cade5726c06b47d68406781dc2a56ba9.Execute() in E:\Solutions\Bolind\Web\Test\Files\Templates\Designs\Bolind\Paragraph\Hero.cshtml:line 7
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Bolind.Web.CustomCode.CDN
2 @using Dynamicweb.Frontend;
3
4 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
5
6 @{
7 string title = Model.Item.GetString("Title");
8 string titleMargin = Model.Item.GetString("Title_Margin");
9 string subtitle = Model.Item.GetString("Subtitle");
10 string subtitleMargin = Model.Item.GetString("Subtitle_Margin");
11 string text = Model.Item.GetString("Text");
12 string textMargin = Model.Item.GetString("Text_Margin");
13 string textPosition = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Text_Position").SelectedValue)
14 ? Model.Item.GetValue<ListViewModel>("Text_Position").SelectedValue
15 : "top";
16 string imagePath = "";
17 if (Model.Item.GetFile("Image") != null)
18 {
19 var imageFile = Model.Item.GetFile("Image");
20 imagePath = Pageview.CdnWrap(imageFile.Path);
21 }
22 string theme = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Theme").SelectedValue)
23 ? Model.Item.GetValue<ListViewModel>("Theme").SelectedValue
24 : "blue";
25
26 bool isInverted = Model.Item.GetBoolean("Invert");
27
28 // YouTube video support
29 string youtubeVideoId = Model.Item.GetString("Youtube_Video_ID");
30 bool hasVideo = !string.IsNullOrEmpty(youtubeVideoId);
31
32 string heroClasses = $"hero-component hero-component--{theme} {(isInverted ? "hero-component--invert" : string.Empty)}".Trim();
33 }
34
35 <hero-youtube inline-template :video-id="'@youtubeVideoId'">
36 <div class="hero-component__wrapper" style="width: 100%">
37 <section class="@heroClasses" data-hero-id="@Model.ID">
38 <div class="hero-component__bg @(string.IsNullOrEmpty(imagePath) ? "hero-component__bg--empty" : string.Empty)" style="@(!string.IsNullOrEmpty(imagePath) ? $"background-image: url('{imagePath}')" : string.Empty)">
39 @if (hasVideo)
40 {
41 <button type="button"
42 class="hero-video-play-button"
43 v-on:click="playVideo"
44 v-show="!isPlaying"
45 aria-label="Afspil video">
46 <span class="material-symbols-rounded hero-video-play-icon">
47 play_arrow
48 </span>
49 </button>
50
51 <div class="hero-youtube-player-container" v-show="isPlaying">
52 <button type="button"
53 class="hero-youtube-close-button"
54 v-on:click="closePlayer"
55 aria-label="Luk video">
56 <span class="material-symbols-rounded hero-video-close-icon">
57 close
58 </span>
59 </button>
60 <div id="hero-youtube-player-@Model.ID" class="hero-youtube-player"></div>
61 </div>
62 }
63 </div>
64
65 <div class="hero-component__inner">
66 <div class="hero-component__content hero-component__content-position--@textPosition">
67 @if (!string.IsNullOrEmpty(title))
68 {
69 <h1 class="hero-component__title" @(!string.IsNullOrEmpty(titleMargin) ? $"style=\"margin: {titleMargin}\"" : string.Empty)>@title</h1>
70 }
71 @if (!string.IsNullOrEmpty(subtitle))
72 {
73 <h2 class="hero-component__subtitle" @(!string.IsNullOrEmpty(subtitleMargin) ? $"style=\"margin: {subtitleMargin}\"" : string.Empty)>@subtitle</h2>
74 }
75 @if (!string.IsNullOrEmpty(text))
76 {
77 <p class="hero-component__text" @(!string.IsNullOrEmpty(textMargin) ? $"style=\"margin: {textMargin}\"" : string.Empty)>@text</p>
78 }
79 </div>
80 </div>
81 </section>
82 </div>
83 </hero-youtube>
84
Error executing template "Designs/Bolind/Paragraph/Hero.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_cade5726c06b47d68406781dc2a56ba9.Execute() in E:\Solutions\Bolind\Web\Test\Files\Templates\Designs\Bolind\Paragraph\Hero.cshtml:line 7
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Bolind.Web.CustomCode.CDN
2 @using Dynamicweb.Frontend;
3
4 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
5
6 @{
7 string title = Model.Item.GetString("Title");
8 string titleMargin = Model.Item.GetString("Title_Margin");
9 string subtitle = Model.Item.GetString("Subtitle");
10 string subtitleMargin = Model.Item.GetString("Subtitle_Margin");
11 string text = Model.Item.GetString("Text");
12 string textMargin = Model.Item.GetString("Text_Margin");
13 string textPosition = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Text_Position").SelectedValue)
14 ? Model.Item.GetValue<ListViewModel>("Text_Position").SelectedValue
15 : "top";
16 string imagePath = "";
17 if (Model.Item.GetFile("Image") != null)
18 {
19 var imageFile = Model.Item.GetFile("Image");
20 imagePath = Pageview.CdnWrap(imageFile.Path);
21 }
22 string theme = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Theme").SelectedValue)
23 ? Model.Item.GetValue<ListViewModel>("Theme").SelectedValue
24 : "blue";
25
26 bool isInverted = Model.Item.GetBoolean("Invert");
27
28 // YouTube video support
29 string youtubeVideoId = Model.Item.GetString("Youtube_Video_ID");
30 bool hasVideo = !string.IsNullOrEmpty(youtubeVideoId);
31
32 string heroClasses = $"hero-component hero-component--{theme} {(isInverted ? "hero-component--invert" : string.Empty)}".Trim();
33 }
34
35 <hero-youtube inline-template :video-id="'@youtubeVideoId'">
36 <div class="hero-component__wrapper" style="width: 100%">
37 <section class="@heroClasses" data-hero-id="@Model.ID">
38 <div class="hero-component__bg @(string.IsNullOrEmpty(imagePath) ? "hero-component__bg--empty" : string.Empty)" style="@(!string.IsNullOrEmpty(imagePath) ? $"background-image: url('{imagePath}')" : string.Empty)">
39 @if (hasVideo)
40 {
41 <button type="button"
42 class="hero-video-play-button"
43 v-on:click="playVideo"
44 v-show="!isPlaying"
45 aria-label="Afspil video">
46 <span class="material-symbols-rounded hero-video-play-icon">
47 play_arrow
48 </span>
49 </button>
50
51 <div class="hero-youtube-player-container" v-show="isPlaying">
52 <button type="button"
53 class="hero-youtube-close-button"
54 v-on:click="closePlayer"
55 aria-label="Luk video">
56 <span class="material-symbols-rounded hero-video-close-icon">
57 close
58 </span>
59 </button>
60 <div id="hero-youtube-player-@Model.ID" class="hero-youtube-player"></div>
61 </div>
62 }
63 </div>
64
65 <div class="hero-component__inner">
66 <div class="hero-component__content hero-component__content-position--@textPosition">
67 @if (!string.IsNullOrEmpty(title))
68 {
69 <h1 class="hero-component__title" @(!string.IsNullOrEmpty(titleMargin) ? $"style=\"margin: {titleMargin}\"" : string.Empty)>@title</h1>
70 }
71 @if (!string.IsNullOrEmpty(subtitle))
72 {
73 <h2 class="hero-component__subtitle" @(!string.IsNullOrEmpty(subtitleMargin) ? $"style=\"margin: {subtitleMargin}\"" : string.Empty)>@subtitle</h2>
74 }
75 @if (!string.IsNullOrEmpty(text))
76 {
77 <p class="hero-component__text" @(!string.IsNullOrEmpty(textMargin) ? $"style=\"margin: {textMargin}\"" : string.Empty)>@text</p>
78 }
79 </div>
80 </div>
81 </section>
82 </div>
83 </hero-youtube>
84
Error executing template "Designs/Bolind/Paragraph/Hero.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_cade5726c06b47d68406781dc2a56ba9.Execute() in E:\Solutions\Bolind\Web\Test\Files\Templates\Designs\Bolind\Paragraph\Hero.cshtml:line 7
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Bolind.Web.CustomCode.CDN
2 @using Dynamicweb.Frontend;
3
4 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
5
6 @{
7 string title = Model.Item.GetString("Title");
8 string titleMargin = Model.Item.GetString("Title_Margin");
9 string subtitle = Model.Item.GetString("Subtitle");
10 string subtitleMargin = Model.Item.GetString("Subtitle_Margin");
11 string text = Model.Item.GetString("Text");
12 string textMargin = Model.Item.GetString("Text_Margin");
13 string textPosition = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Text_Position").SelectedValue)
14 ? Model.Item.GetValue<ListViewModel>("Text_Position").SelectedValue
15 : "top";
16 string imagePath = "";
17 if (Model.Item.GetFile("Image") != null)
18 {
19 var imageFile = Model.Item.GetFile("Image");
20 imagePath = Pageview.CdnWrap(imageFile.Path);
21 }
22 string theme = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Theme").SelectedValue)
23 ? Model.Item.GetValue<ListViewModel>("Theme").SelectedValue
24 : "blue";
25
26 bool isInverted = Model.Item.GetBoolean("Invert");
27
28 // YouTube video support
29 string youtubeVideoId = Model.Item.GetString("Youtube_Video_ID");
30 bool hasVideo = !string.IsNullOrEmpty(youtubeVideoId);
31
32 string heroClasses = $"hero-component hero-component--{theme} {(isInverted ? "hero-component--invert" : string.Empty)}".Trim();
33 }
34
35 <hero-youtube inline-template :video-id="'@youtubeVideoId'">
36 <div class="hero-component__wrapper" style="width: 100%">
37 <section class="@heroClasses" data-hero-id="@Model.ID">
38 <div class="hero-component__bg @(string.IsNullOrEmpty(imagePath) ? "hero-component__bg--empty" : string.Empty)" style="@(!string.IsNullOrEmpty(imagePath) ? $"background-image: url('{imagePath}')" : string.Empty)">
39 @if (hasVideo)
40 {
41 <button type="button"
42 class="hero-video-play-button"
43 v-on:click="playVideo"
44 v-show="!isPlaying"
45 aria-label="Afspil video">
46 <span class="material-symbols-rounded hero-video-play-icon">
47 play_arrow
48 </span>
49 </button>
50
51 <div class="hero-youtube-player-container" v-show="isPlaying">
52 <button type="button"
53 class="hero-youtube-close-button"
54 v-on:click="closePlayer"
55 aria-label="Luk video">
56 <span class="material-symbols-rounded hero-video-close-icon">
57 close
58 </span>
59 </button>
60 <div id="hero-youtube-player-@Model.ID" class="hero-youtube-player"></div>
61 </div>
62 }
63 </div>
64
65 <div class="hero-component__inner">
66 <div class="hero-component__content hero-component__content-position--@textPosition">
67 @if (!string.IsNullOrEmpty(title))
68 {
69 <h1 class="hero-component__title" @(!string.IsNullOrEmpty(titleMargin) ? $"style=\"margin: {titleMargin}\"" : string.Empty)>@title</h1>
70 }
71 @if (!string.IsNullOrEmpty(subtitle))
72 {
73 <h2 class="hero-component__subtitle" @(!string.IsNullOrEmpty(subtitleMargin) ? $"style=\"margin: {subtitleMargin}\"" : string.Empty)>@subtitle</h2>
74 }
75 @if (!string.IsNullOrEmpty(text))
76 {
77 <p class="hero-component__text" @(!string.IsNullOrEmpty(textMargin) ? $"style=\"margin: {textMargin}\"" : string.Empty)>@text</p>
78 }
79 </div>
80 </div>
81 </section>
82 </div>
83 </hero-youtube>
84
Error executing template "Designs/Bolind/Paragraph/Hero.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_cade5726c06b47d68406781dc2a56ba9.Execute() in E:\Solutions\Bolind\Web\Test\Files\Templates\Designs\Bolind\Paragraph\Hero.cshtml:line 7
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Bolind.Web.CustomCode.CDN
2 @using Dynamicweb.Frontend;
3
4 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
5
6 @{
7 string title = Model.Item.GetString("Title");
8 string titleMargin = Model.Item.GetString("Title_Margin");
9 string subtitle = Model.Item.GetString("Subtitle");
10 string subtitleMargin = Model.Item.GetString("Subtitle_Margin");
11 string text = Model.Item.GetString("Text");
12 string textMargin = Model.Item.GetString("Text_Margin");
13 string textPosition = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Text_Position").SelectedValue)
14 ? Model.Item.GetValue<ListViewModel>("Text_Position").SelectedValue
15 : "top";
16 string imagePath = "";
17 if (Model.Item.GetFile("Image") != null)
18 {
19 var imageFile = Model.Item.GetFile("Image");
20 imagePath = Pageview.CdnWrap(imageFile.Path);
21 }
22 string theme = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Theme").SelectedValue)
23 ? Model.Item.GetValue<ListViewModel>("Theme").SelectedValue
24 : "blue";
25
26 bool isInverted = Model.Item.GetBoolean("Invert");
27
28 // YouTube video support
29 string youtubeVideoId = Model.Item.GetString("Youtube_Video_ID");
30 bool hasVideo = !string.IsNullOrEmpty(youtubeVideoId);
31
32 string heroClasses = $"hero-component hero-component--{theme} {(isInverted ? "hero-component--invert" : string.Empty)}".Trim();
33 }
34
35 <hero-youtube inline-template :video-id="'@youtubeVideoId'">
36 <div class="hero-component__wrapper" style="width: 100%">
37 <section class="@heroClasses" data-hero-id="@Model.ID">
38 <div class="hero-component__bg @(string.IsNullOrEmpty(imagePath) ? "hero-component__bg--empty" : string.Empty)" style="@(!string.IsNullOrEmpty(imagePath) ? $"background-image: url('{imagePath}')" : string.Empty)">
39 @if (hasVideo)
40 {
41 <button type="button"
42 class="hero-video-play-button"
43 v-on:click="playVideo"
44 v-show="!isPlaying"
45 aria-label="Afspil video">
46 <span class="material-symbols-rounded hero-video-play-icon">
47 play_arrow
48 </span>
49 </button>
50
51 <div class="hero-youtube-player-container" v-show="isPlaying">
52 <button type="button"
53 class="hero-youtube-close-button"
54 v-on:click="closePlayer"
55 aria-label="Luk video">
56 <span class="material-symbols-rounded hero-video-close-icon">
57 close
58 </span>
59 </button>
60 <div id="hero-youtube-player-@Model.ID" class="hero-youtube-player"></div>
61 </div>
62 }
63 </div>
64
65 <div class="hero-component__inner">
66 <div class="hero-component__content hero-component__content-position--@textPosition">
67 @if (!string.IsNullOrEmpty(title))
68 {
69 <h1 class="hero-component__title" @(!string.IsNullOrEmpty(titleMargin) ? $"style=\"margin: {titleMargin}\"" : string.Empty)>@title</h1>
70 }
71 @if (!string.IsNullOrEmpty(subtitle))
72 {
73 <h2 class="hero-component__subtitle" @(!string.IsNullOrEmpty(subtitleMargin) ? $"style=\"margin: {subtitleMargin}\"" : string.Empty)>@subtitle</h2>
74 }
75 @if (!string.IsNullOrEmpty(text))
76 {
77 <p class="hero-component__text" @(!string.IsNullOrEmpty(textMargin) ? $"style=\"margin: {textMargin}\"" : string.Empty)>@text</p>
78 }
79 </div>
80 </div>
81 </section>
82 </div>
83 </hero-youtube>
84
Error executing template "Designs/Bolind/Paragraph/Basic_Cards.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_ab586d04fad5409c9396b8fafa0401b2.Execute() in E:\Solutions\Bolind\Web\Test\Files\Templates\Designs\Bolind\Paragraph\Basic_Cards.cshtml:line 7
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Bolind.Web.CustomCode.CDN
2 @using Dynamicweb.Frontend;
3
4 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
5
6 @{
7 var items = Model.Item.GetItems("Items");
8 }
9
10 @if (Model.Item.GetItems("Items").Any())
11 {
12 <section class="cards-component">
13 <div class="cards-component__wrapper cards-component__wrapper-count--@Model.Item.GetItems("Items").Count()">
14 @foreach (var item in Model.Item.GetItems("Items"))
15 {
16 string cardTitle = item.GetString("Title");
17 string cardImagePath = item.GetFile("Image") != null ? Pageview.CdnWrap(item.GetFile("Image").Path) : "";
18 string cardLink = item.GetString("Link");
19 string textColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Color").SelectedValue) ? item.GetValue<ListViewModel>("Text_Color").SelectedValue : "dark";
20 string textPosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Position").SelectedValue) ? item.GetValue<ListViewModel>("Text_Position").SelectedValue : "bottom-left";
21 string circleColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Color").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Color").SelectedValue : string.Empty;
22 string circlePosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Position").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Position").SelectedValue : "top-right";
23 bool useGradient = item.GetBoolean("Use_Gradient");
24
25 <article class="card-component-item card-component-item--@textColor @(string.IsNullOrEmpty(cardImagePath) ? "card-component-item--no-bg" : string.Empty) @(!string.IsNullOrEmpty(cardLink) ? "card-component-item--has-link" : string.Empty) @(useGradient ? "card-component-item--gradient" : string.Empty)">
26 @if (!string.IsNullOrEmpty(cardImagePath))
27 {
28 <div class="card-component-item__bg" style="background-image:url('@cardImagePath');"></div>
29 }
30
31 <div class="card-component-item__inner card-component-item__inner--@textPosition">
32 @if (!string.IsNullOrEmpty(cardTitle))
33 {
34 <h4 class="card-component-item__title card-component-item__title--@textColor">@Raw(cardTitle.Replace("\\n", "<br />"))</h4>
35 }
36
37 @if (!string.IsNullOrEmpty(cardLink))
38 {
39 <a class="card-component-item__link" href="@cardLink" aria-label="@cardLink"></a>
40 }
41 </div>
42
43 @if (!string.IsNullOrEmpty(circleColor))
44 {
45 <div class="card-component-item__circle card-component-item__circle--@circleColor card-component-item__circle--@circlePosition"></div>
46 }
47 </article>
48 }
49 </div>
50 </section>
51 }
Error executing template "Designs/Bolind/Paragraph/Basic_Cards.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_ab586d04fad5409c9396b8fafa0401b2.Execute() in E:\Solutions\Bolind\Web\Test\Files\Templates\Designs\Bolind\Paragraph\Basic_Cards.cshtml:line 7
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Bolind.Web.CustomCode.CDN
2 @using Dynamicweb.Frontend;
3
4 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
5
6 @{
7 var items = Model.Item.GetItems("Items");
8 }
9
10 @if (Model.Item.GetItems("Items").Any())
11 {
12 <section class="cards-component">
13 <div class="cards-component__wrapper cards-component__wrapper-count--@Model.Item.GetItems("Items").Count()">
14 @foreach (var item in Model.Item.GetItems("Items"))
15 {
16 string cardTitle = item.GetString("Title");
17 string cardImagePath = item.GetFile("Image") != null ? Pageview.CdnWrap(item.GetFile("Image").Path) : "";
18 string cardLink = item.GetString("Link");
19 string textColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Color").SelectedValue) ? item.GetValue<ListViewModel>("Text_Color").SelectedValue : "dark";
20 string textPosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Position").SelectedValue) ? item.GetValue<ListViewModel>("Text_Position").SelectedValue : "bottom-left";
21 string circleColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Color").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Color").SelectedValue : string.Empty;
22 string circlePosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Position").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Position").SelectedValue : "top-right";
23 bool useGradient = item.GetBoolean("Use_Gradient");
24
25 <article class="card-component-item card-component-item--@textColor @(string.IsNullOrEmpty(cardImagePath) ? "card-component-item--no-bg" : string.Empty) @(!string.IsNullOrEmpty(cardLink) ? "card-component-item--has-link" : string.Empty) @(useGradient ? "card-component-item--gradient" : string.Empty)">
26 @if (!string.IsNullOrEmpty(cardImagePath))
27 {
28 <div class="card-component-item__bg" style="background-image:url('@cardImagePath');"></div>
29 }
30
31 <div class="card-component-item__inner card-component-item__inner--@textPosition">
32 @if (!string.IsNullOrEmpty(cardTitle))
33 {
34 <h4 class="card-component-item__title card-component-item__title--@textColor">@Raw(cardTitle.Replace("\\n", "<br />"))</h4>
35 }
36
37 @if (!string.IsNullOrEmpty(cardLink))
38 {
39 <a class="card-component-item__link" href="@cardLink" aria-label="@cardLink"></a>
40 }
41 </div>
42
43 @if (!string.IsNullOrEmpty(circleColor))
44 {
45 <div class="card-component-item__circle card-component-item__circle--@circleColor card-component-item__circle--@circlePosition"></div>
46 }
47 </article>
48 }
49 </div>
50 </section>
51 }
Error executing template "Designs/Bolind/Paragraph/Basic_Cards.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_ab586d04fad5409c9396b8fafa0401b2.Execute() in E:\Solutions\Bolind\Web\Test\Files\Templates\Designs\Bolind\Paragraph\Basic_Cards.cshtml:line 7
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Bolind.Web.CustomCode.CDN
2 @using Dynamicweb.Frontend;
3
4 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
5
6 @{
7 var items = Model.Item.GetItems("Items");
8 }
9
10 @if (Model.Item.GetItems("Items").Any())
11 {
12 <section class="cards-component">
13 <div class="cards-component__wrapper cards-component__wrapper-count--@Model.Item.GetItems("Items").Count()">
14 @foreach (var item in Model.Item.GetItems("Items"))
15 {
16 string cardTitle = item.GetString("Title");
17 string cardImagePath = item.GetFile("Image") != null ? Pageview.CdnWrap(item.GetFile("Image").Path) : "";
18 string cardLink = item.GetString("Link");
19 string textColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Color").SelectedValue) ? item.GetValue<ListViewModel>("Text_Color").SelectedValue : "dark";
20 string textPosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Position").SelectedValue) ? item.GetValue<ListViewModel>("Text_Position").SelectedValue : "bottom-left";
21 string circleColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Color").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Color").SelectedValue : string.Empty;
22 string circlePosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Position").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Position").SelectedValue : "top-right";
23 bool useGradient = item.GetBoolean("Use_Gradient");
24
25 <article class="card-component-item card-component-item--@textColor @(string.IsNullOrEmpty(cardImagePath) ? "card-component-item--no-bg" : string.Empty) @(!string.IsNullOrEmpty(cardLink) ? "card-component-item--has-link" : string.Empty) @(useGradient ? "card-component-item--gradient" : string.Empty)">
26 @if (!string.IsNullOrEmpty(cardImagePath))
27 {
28 <div class="card-component-item__bg" style="background-image:url('@cardImagePath');"></div>
29 }
30
31 <div class="card-component-item__inner card-component-item__inner--@textPosition">
32 @if (!string.IsNullOrEmpty(cardTitle))
33 {
34 <h4 class="card-component-item__title card-component-item__title--@textColor">@Raw(cardTitle.Replace("\\n", "<br />"))</h4>
35 }
36
37 @if (!string.IsNullOrEmpty(cardLink))
38 {
39 <a class="card-component-item__link" href="@cardLink" aria-label="@cardLink"></a>
40 }
41 </div>
42
43 @if (!string.IsNullOrEmpty(circleColor))
44 {
45 <div class="card-component-item__circle card-component-item__circle--@circleColor card-component-item__circle--@circlePosition"></div>
46 }
47 </article>
48 }
49 </div>
50 </section>
51 }
Error executing template "Designs/Bolind/Paragraph/Basic_Cards.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_ab586d04fad5409c9396b8fafa0401b2.Execute() in E:\Solutions\Bolind\Web\Test\Files\Templates\Designs\Bolind\Paragraph\Basic_Cards.cshtml:line 7
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Bolind.Web.CustomCode.CDN
2 @using Dynamicweb.Frontend;
3
4 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
5
6 @{
7 var items = Model.Item.GetItems("Items");
8 }
9
10 @if (Model.Item.GetItems("Items").Any())
11 {
12 <section class="cards-component">
13 <div class="cards-component__wrapper cards-component__wrapper-count--@Model.Item.GetItems("Items").Count()">
14 @foreach (var item in Model.Item.GetItems("Items"))
15 {
16 string cardTitle = item.GetString("Title");
17 string cardImagePath = item.GetFile("Image") != null ? Pageview.CdnWrap(item.GetFile("Image").Path) : "";
18 string cardLink = item.GetString("Link");
19 string textColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Color").SelectedValue) ? item.GetValue<ListViewModel>("Text_Color").SelectedValue : "dark";
20 string textPosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Position").SelectedValue) ? item.GetValue<ListViewModel>("Text_Position").SelectedValue : "bottom-left";
21 string circleColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Color").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Color").SelectedValue : string.Empty;
22 string circlePosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Position").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Position").SelectedValue : "top-right";
23 bool useGradient = item.GetBoolean("Use_Gradient");
24
25 <article class="card-component-item card-component-item--@textColor @(string.IsNullOrEmpty(cardImagePath) ? "card-component-item--no-bg" : string.Empty) @(!string.IsNullOrEmpty(cardLink) ? "card-component-item--has-link" : string.Empty) @(useGradient ? "card-component-item--gradient" : string.Empty)">
26 @if (!string.IsNullOrEmpty(cardImagePath))
27 {
28 <div class="card-component-item__bg" style="background-image:url('@cardImagePath');"></div>
29 }
30
31 <div class="card-component-item__inner card-component-item__inner--@textPosition">
32 @if (!string.IsNullOrEmpty(cardTitle))
33 {
34 <h4 class="card-component-item__title card-component-item__title--@textColor">@Raw(cardTitle.Replace("\\n", "<br />"))</h4>
35 }
36
37 @if (!string.IsNullOrEmpty(cardLink))
38 {
39 <a class="card-component-item__link" href="@cardLink" aria-label="@cardLink"></a>
40 }
41 </div>
42
43 @if (!string.IsNullOrEmpty(circleColor))
44 {
45 <div class="card-component-item__circle card-component-item__circle--@circleColor card-component-item__circle--@circlePosition"></div>
46 }
47 </article>
48 }
49 </div>
50 </section>
51 }
Error executing template "Designs/Bolind/Paragraph/Basic_Cards.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_ab586d04fad5409c9396b8fafa0401b2.Execute() in E:\Solutions\Bolind\Web\Test\Files\Templates\Designs\Bolind\Paragraph\Basic_Cards.cshtml:line 7
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Bolind.Web.CustomCode.CDN
2 @using Dynamicweb.Frontend;
3
4 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
5
6 @{
7 var items = Model.Item.GetItems("Items");
8 }
9
10 @if (Model.Item.GetItems("Items").Any())
11 {
12 <section class="cards-component">
13 <div class="cards-component__wrapper cards-component__wrapper-count--@Model.Item.GetItems("Items").Count()">
14 @foreach (var item in Model.Item.GetItems("Items"))
15 {
16 string cardTitle = item.GetString("Title");
17 string cardImagePath = item.GetFile("Image") != null ? Pageview.CdnWrap(item.GetFile("Image").Path) : "";
18 string cardLink = item.GetString("Link");
19 string textColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Color").SelectedValue) ? item.GetValue<ListViewModel>("Text_Color").SelectedValue : "dark";
20 string textPosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Position").SelectedValue) ? item.GetValue<ListViewModel>("Text_Position").SelectedValue : "bottom-left";
21 string circleColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Color").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Color").SelectedValue : string.Empty;
22 string circlePosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Position").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Position").SelectedValue : "top-right";
23 bool useGradient = item.GetBoolean("Use_Gradient");
24
25 <article class="card-component-item card-component-item--@textColor @(string.IsNullOrEmpty(cardImagePath) ? "card-component-item--no-bg" : string.Empty) @(!string.IsNullOrEmpty(cardLink) ? "card-component-item--has-link" : string.Empty) @(useGradient ? "card-component-item--gradient" : string.Empty)">
26 @if (!string.IsNullOrEmpty(cardImagePath))
27 {
28 <div class="card-component-item__bg" style="background-image:url('@cardImagePath');"></div>
29 }
30
31 <div class="card-component-item__inner card-component-item__inner--@textPosition">
32 @if (!string.IsNullOrEmpty(cardTitle))
33 {
34 <h4 class="card-component-item__title card-component-item__title--@textColor">@Raw(cardTitle.Replace("\\n", "<br />"))</h4>
35 }
36
37 @if (!string.IsNullOrEmpty(cardLink))
38 {
39 <a class="card-component-item__link" href="@cardLink" aria-label="@cardLink"></a>
40 }
41 </div>
42
43 @if (!string.IsNullOrEmpty(circleColor))
44 {
45 <div class="card-component-item__circle card-component-item__circle--@circleColor card-component-item__circle--@circlePosition"></div>
46 }
47 </article>
48 }
49 </div>
50 </section>
51 }
Error executing template "Designs/Bolind/Paragraph/Basic_Cards.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_ab586d04fad5409c9396b8fafa0401b2.Execute() in E:\Solutions\Bolind\Web\Test\Files\Templates\Designs\Bolind\Paragraph\Basic_Cards.cshtml:line 7
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using Bolind.Web.CustomCode.CDN
2 @using Dynamicweb.Frontend;
3
4 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
5
6 @{
7 var items = Model.Item.GetItems("Items");
8 }
9
10 @if (Model.Item.GetItems("Items").Any())
11 {
12 <section class="cards-component">
13 <div class="cards-component__wrapper cards-component__wrapper-count--@Model.Item.GetItems("Items").Count()">
14 @foreach (var item in Model.Item.GetItems("Items"))
15 {
16 string cardTitle = item.GetString("Title");
17 string cardImagePath = item.GetFile("Image") != null ? Pageview.CdnWrap(item.GetFile("Image").Path) : "";
18 string cardLink = item.GetString("Link");
19 string textColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Color").SelectedValue) ? item.GetValue<ListViewModel>("Text_Color").SelectedValue : "dark";
20 string textPosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Text_Position").SelectedValue) ? item.GetValue<ListViewModel>("Text_Position").SelectedValue : "bottom-left";
21 string circleColor = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Color").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Color").SelectedValue : string.Empty;
22 string circlePosition = !string.IsNullOrEmpty(item.GetValue<ListViewModel>("Circle_Position").SelectedValue) ? item.GetValue<ListViewModel>("Circle_Position").SelectedValue : "top-right";
23 bool useGradient = item.GetBoolean("Use_Gradient");
24
25 <article class="card-component-item card-component-item--@textColor @(string.IsNullOrEmpty(cardImagePath) ? "card-component-item--no-bg" : string.Empty) @(!string.IsNullOrEmpty(cardLink) ? "card-component-item--has-link" : string.Empty) @(useGradient ? "card-component-item--gradient" : string.Empty)">
26 @if (!string.IsNullOrEmpty(cardImagePath))
27 {
28 <div class="card-component-item__bg" style="background-image:url('@cardImagePath');"></div>
29 }
30
31 <div class="card-component-item__inner card-component-item__inner--@textPosition">
32 @if (!string.IsNullOrEmpty(cardTitle))
33 {
34 <h4 class="card-component-item__title card-component-item__title--@textColor">@Raw(cardTitle.Replace("\\n", "<br />"))</h4>
35 }
36
37 @if (!string.IsNullOrEmpty(cardLink))
38 {
39 <a class="card-component-item__link" href="@cardLink" aria-label="@cardLink"></a>
40 }
41 </div>
42
43 @if (!string.IsNullOrEmpty(circleColor))
44 {
45 <div class="card-component-item__circle card-component-item__circle--@circleColor card-component-item__circle--@circlePosition"></div>
46 }
47 </article>
48 }
49 </div>
50 </section>
51 }