
Keyshot - a strong 3D rendering software
Looking for a quick and easy way to create high-quality photorealistic images and animations? KeyShot Studio has everything you need.
Keyshot - a strong 3D rendering softwareThe power of rendering in your hands
KeyShot Studio, with its real-time rendering technology, extensive material library, and user-friendly interface, is the ideal tool for bringing ideas to life with stunning images.
It allows users to create, iterate, and refine renders efficiently, aiding in design decision-making and speeding up market commercialization. As official partners with certified expertise,
We are official partners of KeyShot and have the official certification from the manufacturer that endorses us as distributors and experts.
Your designs will be more realistic than ever before
You can create anything that comes to mind, from still images and animations to interactive websites and mobile content.
Easy
Focus on your designs
It is extremely easy to learn and use. You will achieve photographic results in minutes through a simple, workflow-based interface with all the advanced capabilities you need.
Fast
Present your ideas sooner
It brings speed and visual agility throughout the design process, with the widest compatibility with 3D file formats for a smooth workflow from concept to final product.
Accurate
Make it more realistic
Its materials go beyond physical appearance and provide scientifically accurate properties so you can create spectacular images. Use a preset, an existing material, or create your own.
Advanced
Illuminate your scenes
It provides advanced lighting capabilities that allow you to create the lights and shadows your products or scenes need to look as realistic as possible. You decide what type of lighting to give it.
Enjoy the perfect image in 5 steps!
With Keyshot it's easy to generate great images. After 5 steps you just have to watch how the image renders before your eyes. From start to finish, 5 simple steps to create impactful images quickly and in real-time.
Watch the video with the entire process.

A strong tool for all industries
KeyShot Studio adapts to any industry and offers you the flexibility to create images for anything you can imagine.

Industry and machinery
From detailed representation of mechanical parts to simulation of processes and operations, KeyShot Studio allows engineers and industrial designers to explore, modify, and perfect their creations.

Product design
KeyShot Studio has become a visualization standard throughout the design process, from the initial concept, through design iteration, to the product reaching the store shelf.

Automotive
KeyShot Studio is used in the industry to create powerful images that communicate infinite possibilities. You will be surprised at how easily you can create everything with KeyShot Studio.

Fashion and accessories
If you need detail and precision, KeyShot Studio offers exclusive leather materials, custom texture capabilities, and fabric and textile simulation never seen before.

Packaging
From bags and containers to bottles and boxes, KeyShot Studio can showcase the materials that make your packaging unique and animate its functionality in the real world. Improve every part of your packaging workflow, from idea to approval.

Architecture and interior design
Create photorealistic renders and high-quality animations for your architectural and interior design projects with KeyShot Studio. Experiment with materials, lighting, and perspectives.
Error executing template "Designs/Swift/Paragraph/9a_Content_RelatedContentBanner.cshtml" System.ArgumentException: field "$facets" was not indexed with SortedSetDocValues at Lucene.Net.Facet.SortedSet.DefaultSortedSetDocValuesReaderState..ctor(IndexReader reader, String field) at Dynamicweb.Indexing.Lucene.LuceneIndexProvider.<get_ReaderState>b__14_0(String path) at Dynamicweb.Indexing.Lucene.LuceneIndexProvider.SearchInternal(IQuery query, QuerySettings settings) at Dynamicweb.Indexing.Queries.IndexQueryProvider.Query(IQuery query, QuerySettings settings) at Dynamicweb.Indexing.Querying.QueryService.Query(IQuery query, QuerySettings settings) at NineAltitudes.CustomCode.NineAContent.ContentClient.NineAContentService.GetResults(Int32 pageSize, IQueryService queryService, IQuery query, Dictionary`2 parameters) at NineAltitudes.CustomCode.NineAContent.ContentClient.NineAContentService.GetContentByTagFilters(Int32 pageAreaId, IEnumerable`1 contentTypes, IEnumerable`1 tagFilters, Int32 pageSize) at CompiledRazorTemplates.Dynamic.RazorEngine_4b4bf40587554eb08b06e1b44c31958a.GetFacetedContent(ParagraphViewModel model, Int32 maxItems, Int32 pageAreaId) at CompiledRazorTemplates.Dynamic.RazorEngine_4b4bf40587554eb08b06e1b44c31958a.ExecuteAsync() at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass23_0.<Run>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using NineAltitudes.CustomCode.NineAContent; 3 @using Dynamicweb.Rendering; 4 @using Dynamicweb.Core; 5 @using Dynamicweb.Extensibility; 6 @using Dynamicweb.Frontend; 7 @using System.Linq; 8 @using System.IO; 9 @using NineAltitudes.CustomCode.NineAContent.ContentClient; 10 11 @{ 12 int maxItemsInList = Model.Item.GetInt32("MaxItemsInList"); 13 if (maxItemsInList == 0) 14 { 15 maxItemsInList = 10; 16 } 17 18 var pageView = Dynamicweb.Frontend.PageView.Current(); 19 int currentPageAreaId = pageView.AreaID; 20 var content = GetFacetedContent(Model, maxItemsInList, currentPageAreaId); 21 } 22 23 @functions { 24 25 private List<Dynamicweb.Frontend.ItemViewModel> GetFacetedContent(ParagraphViewModel model, int maxItems, int pageAreaId) 26 { 27 var selectedTags = GetSelectedTags(model); 28 29 var contentTypes = model.Item?.GetList("ContentTypes")?.GetRawValue().OfType<string>() ?? Enumerable.Empty<string>(); 30 31 var service = ServiceLocator.Current.GetInstance<INineAContentQueryService>(); 32 33 var contentWithTags = service.GetContentByTagFilters(pageAreaId, contentTypes, selectedTags, maxItems); 34 35 36 var localizedTagPageIds = contentWithTags.Select(tag => tag.PageId).Take(maxItems); 37 var content = GetPagesByPageId(localizedTagPageIds); 38 39 return content; 40 } 41 42 private string[] GetSelectedTags(ParagraphViewModel model) 43 { 44 var industry_filters = model.Item?.GetList("Filters_Tags_Industries")?.GetRawValue().OfType<string>(); 45 var vendor_filters = model.Item?.GetList("Filters_Tags_Vendors")?.GetRawValue().OfType<string>(); 46 var domain_filters = model.Item?.GetList("Filters_Tags_Domains")?.GetRawValue().OfType<string>(); 47 var solution_filters = model.Item?.GetList("Filters_Tags_Solutions")?.GetRawValue().OfType<string>(); 48 var product_filters = model.Item?.GetList("Filters_Tags_Products")?.GetRawValue().OfType<string>(); 49 var country_filters = model.Item?.GetList("Filters_Tags_Countries")?.GetRawValue().OfType<string>(); 50 var service_filters = model.Item?.GetList("Filters_Tags_Services")?.GetRawValue().OfType<string>(); 51 var topic_filters = model.Item?.GetList("Filters_Tags_Topics")?.GetRawValue().OfType<string>(); 52 53 var allTags = (industry_filters ?? []) 54 .Concat(vendor_filters ?? []) 55 .Concat(domain_filters ?? []) 56 .Concat(solution_filters ?? []) 57 .Concat(product_filters ?? []) 58 .Concat(country_filters ?? []) 59 .Concat(service_filters ?? []) 60 .Concat(topic_filters ?? []) 61 .ToArray(); 62 63 return allTags; 64 65 } 66 67 private List<Dynamicweb.Frontend.ItemViewModel> GetPagesByPageId(IEnumerable<int> pageIds) 68 { 69 var lists = new List<Dynamicweb.Frontend.ItemViewModel>(); 70 71 if (pageIds.Any()) 72 { 73 foreach (var tagPageID in pageIds) 74 { 75 var page = Dynamicweb.Content.Services.Pages?.GetPage(Dynamicweb.Core.Converter.ToInt32(tagPageID)) ?? null; 76 var viewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(page)?.Item ?? null; 77 78 if (viewModel != null) 79 { 80 lists.Add(viewModel); 81 } 82 } 83 } 84 return lists; 85 86 } 87 88 89 private int? ToInt(string value) 90 { 91 return Converter.ToInt32(value); 92 } 93 94 private DateTime? ToDateTime(string value) 95 { 96 return Converter.ToDateTime(value); 97 } 98 } 99 100 101 @{ 102 //Not a parameter anymore 103 string listBehaviour = Model.Item.GetRawValueString("ListBehaviour", "articles"); 104 105 //Not a parameter anymore 106 string articleListLayout = Model.Item.GetRawValueString("ArticleListLayout", "carousel"); 107 string articleItemLayout = Model.Item.GetRawValueString("ArticleItemLayout", string.Empty); 108 109 string columnTheme = Model.Item.GetRawValueString("ColumnTheme", string.Empty).ToString().Replace(" ", "").Trim().ToLower(); 110 111 string columnThemeClass = columnTheme != string.Empty ? " theme " + columnTheme + " p-3" + (articleListLayout == "carousel" ? " px-lg-4" : string.Empty) : string.Empty; 112 113 var carouselSettings = Model.Item.GetRawValueString("CarouselSettings", "4"); 114 115 string slidesPerPage = $"slider-item-show{carouselSettings}"; 116 string navigationStyle = $"{Model.Item.GetRawValueString("NavigationStyle", "slider-nav-round")}"; 117 string navigationPlacement = $"{Model.Item.GetRawValueString("NavigationPlacement", "slider-nav-on-slides")}"; 118 string indicatorStyle = $"{Model.Item.GetRawValueString("IndicatorStyle", string.Empty)}"; 119 string revealSlides = Model.Item.GetRawValueString("RevealSlides", "reveal") == "reveal" ? "slider-item-reveal" : string.Empty; 120 string sliderItemsGap = Model.Item.GetRawValueString("SliderItemsGap", "slider-item-gap") == "slider-item-nogap" ? "slider-item-nogap" : string.Empty; 121 string navigationAlwaysVisible = (Model.Item.GetBoolean("NavigationAlwaysVisible")) ? "slider-nav-visible" : string.Empty; 122 string navigationVisibleOnTouch = (Model.Item.GetBoolean("NavigationVisibleOnTouch")) ? "slider-nav-touch" : string.Empty; 123 string navigationShowScrollbar = (Model.Item.GetBoolean("NavigationShowScrollbar")) ? "slider-nav-scrollbar" : string.Empty; 124 string scrollBarForceMobile = (Model.Item.GetBoolean("NavigationShowScrollbar")) ? "--swiffy-slider-track-height:0.5rem !important;" : string.Empty; 125 string navigationSmall = (Model.Item.GetBoolean("NavigationSmall")) ? "slider-nav-sm" : string.Empty; 126 string navigationInvertColors = (Model.Item.GetBoolean("NavigationInvertColors")) ? "slider-nav-dark" : string.Empty; 127 string navigationSlideEntirePage = (Model.Item.GetBoolean("NavigationSlideEntirePage")) ? "slider-nav-page" : string.Empty; 128 string navigationNoLoop = (Model.Item.GetBoolean("NavigationNoLoop")) ? "slider-nav-noloop" : string.Empty; 129 string indicatorsOutsideSlider = (Model.Item.GetBoolean("IndicatorsOutsideSlider") && indicatorStyle != string.Empty) ? "slider-indicators-outside" : string.Empty; 130 string indicatorsHighlightActive = (Model.Item.GetBoolean("IndicatorsHighlightActive")) ? "slider-indicators-highlight" : string.Empty; 131 string indicatorsInvertColors = (Model.Item.GetBoolean("IndicatorsInvertedColors")) ? "slider-indicators-dark" : string.Empty; 132 string indicatorsVisibleOnSmallDevices = (Model.Item.GetBoolean("IndicatorsVisibleOnSmallDevices")) ? "slider-indicators-sm" : string.Empty; 133 string animation = Model.Item.GetRawValueString("Animation", string.Empty) != string.Empty ? $"slider-nav-animation {Model.Item.GetRawValueString("Animation")}" : string.Empty; 134 string autoplay = (Model.Item.GetBoolean("Autoplay")) ? "slider-nav-autoplay" : string.Empty; 135 string autoplayInterval = Model.Item.GetRawValueString("AutoplayInterval", string.Empty); 136 bool hideSliderNavigation = false; 137 138 var totalItems = content.Count(); 139 var count = content.Count(); 140 var hasItems = content.Any(); 141 142 var percent = count > 0 ? Convert.ToInt32(Math.Round(((double)count / totalItems) * 100, 0)) : 0; 143 var disableLoadMoreButton = count == totalItems ? true : false; 144 145 var loadMore = !disableLoadMoreButton ? $"onclick=\"document.querySelector('#PageSize_{Pageview.CurrentParagraph.ID}').value='{count + maxItemsInList}'; this.dispatchEvent(new window.Event('change', {{ bubbles: true }}))\"" : null; 146 var disabled = disableLoadMoreButton ? "disabled" : null; 147 148 bool showLoadMore = Model.Item.GetBoolean("ShowLoadMore"); 149 150 string titleFontSize = Model.Item.GetString("TitleFontSize", string.Empty); 151 string gridSettings = Model.Item.GetString("GridSettings", "4"); 152 153 bool showButton = Model.Item.GetBoolean("ShowButton"); 154 bool showDates = Model.Item.GetBoolean("ShowDates"); 155 string ratio = Model.Item.GetString("ImageAspectRatio", string.Empty); 156 ratio = ratio != "0" ? ratio : string.Empty; 157 158 string articleItemTheme = Model.Item.GetString("ArticleItemTheme", string.Empty).Replace(" ","").Trim().ToLower(); 159 string articleItemShape = Model.Item.GetString("ArticleItemShape", "boxed"); 160 161 162 if (navigationStyle == "slider-nav-none") 163 { 164 hideSliderNavigation = true; 165 } 166 167 <div class="h-100@(columnThemeClass) item_@Model.Item.SystemName.ToLower()"> 168 <div id="@Model.ID" class="user-select-none" style="scroll-margin-top:var(--header-height,150px)"></div> 169 @{ 170 if (!Model.Item.GetBoolean("HideTitle")) 171 { 172 173 string headingLevel = "h2"; 174 string headingLevelStart = $"<{headingLevel} class=\" mb-4\">"; 175 string headingLevelStop = $"</{headingLevel}>"; 176 @headingLevelStart 177 @Model.Item.GetString("Title") 178 @headingLevelStop 179 } 180 } 181 <div id="Slider_@Model.ID" class="swiffy-slider @(slidesPerPage) @(navigationStyle) @(revealSlides) @(navigationPlacement) @(navigationAlwaysVisible) @(navigationVisibleOnTouch) @(sliderItemsGap) @(indicatorStyle) @(navigationShowScrollbar) @(navigationSmall) @(navigationInvertColors) @(indicatorsOutsideSlider) @(navigationNoLoop) @(indicatorsHighlightActive) @(indicatorsInvertColors) @(indicatorsVisibleOnSmallDevices) @(navigationSlideEntirePage) @(animation) @(autoplay) item_@Model.Item.SystemName.ToLower()" style="--swiffy-slider-nav-light:var(--swift-foreground-color);--swiffy-slider-nav-dark:var(--swift-background-color);visibility:hidden;opacity:0;@(scrollBarForceMobile)" data-slider-nav-autoplay-interval="@(autoplayInterval)"> 182 <div class="slider-container pb-3 py-lg-3 px-lg-3 mt-lg-n3 mx-lg-n3"> 183 184 @{ 185 186 // CARD SPECIFIC SETTINGS 187 188 string orderReverseClass = articleItemLayout == "image-right" ? " order-first order-lg-last" : string.Empty; 189 string articleItemLayoutClass = string.Empty; 190 191 string ratioCssClass = ratio != string.Empty ? " ratio" : string.Empty; 192 string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty; 193 194 string shapeClass = " rounded-0"; 195 if (articleItemShape == "rounded") 196 { 197 shapeClass = " rounded-4"; 198 } 199 200 string settingsClassGrid = string.Empty; 201 switch (gridSettings) 202 { 203 case "2": 204 settingsClassGrid = " grid-md-2"; 205 break; 206 case "3": 207 settingsClassGrid = " grid-md-3"; 208 break; 209 case "4": 210 settingsClassGrid = " grid-md-2 grid-lg-3 grid-xl-4"; 211 break; 212 case "5": 213 settingsClassGrid = " grid-md-2 grid-lg-3 grid-xl-5"; 214 break; 215 } 216 string gridWrapperStart = articleListLayout == "grid" ? $"<div class=\"article-list grid gap-4 grid-1{settingsClassGrid}\">" : null; 217 string gridWrapperEnd = articleListLayout == "grid" ? "</div>" : null; 218 219 bool hasListContext = Pageview.CurrentParagraph.Item["ListContext"] is object; 220 } 221 222 <!--CARDS BEGIN HERE --> 223 224 @foreach (var item in content) 225 { 226 string title = !string.IsNullOrEmpty(item.GetString("Title")) && !item.GetBoolean("HideTitle") ? item.GetString("Title") : string.Empty; 227 string coverTitle = title; 228 string coverImagePath = item.GetString("Image", string.Empty); 229 bool hasFocalPoint = item.GetBoolean("Image.ImageHasFocalPoint"); 230 231 int focalX = hasFocalPoint ? (int)item.GetDouble("ItemPublisher:Item.CoverImage.FocalX") : 0; 232 int focalY = hasFocalPoint ? (int)item.GetDouble("ItemPublisher:Item.CoverImage.FocalY") : 0; 233 234 int xPos = 100 - ((100 - focalX) / 2); 235 int yPos = ((100 - focalY) / 2); 236 string cssPosition = $"{xPos}% {yPos}%"; 237 238 string summary = !string.IsNullOrEmpty(item.GetString("Summary")) ? item.GetString("Summary") : string.Empty; 239 240 string? publishedDate = item.GetString("PublishedDate"); 241 bool hidePublishedDate = item.GetBoolean("HidePublishedDate"); 242 243 if (hidePublishedDate) 244 { 245 publishedDate = null; 246 } 247 else 248 { 249 publishedDate = ToDateTime(publishedDate)?.ToShortDateString(); 250 if (publishedDate == "01/01/1900" || (publishedDate is not null && (publishedDate.Contains("1900") || publishedDate.Contains("0001")))) 251 { 252 publishedDate = null; 253 } 254 } 255 256 string link = item.Link; 257 string buttonLabel = item.GetString("ButtonLabel", string.Empty); 258 259 260 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/"; 261 262 int? author = ToInt(item.GetString("Author")); 263 264 bool renderContentWrapper = true; 265 bool renderArticleInfoWrapper = true; 266 267 if (string.IsNullOrEmpty(title) && string.IsNullOrEmpty(summary) && string.IsNullOrEmpty(publishedDate) && !showButton) 268 { 269 renderContentWrapper = false; 270 } 271 272 if (string.IsNullOrEmpty(publishedDate) || !showDates) 273 { 274 renderArticleInfoWrapper = false; 275 } 276 277 switch (articleItemLayout) 278 { 279 case "image-left": 280 case "image-right": 281 articleItemLayoutClass = !string.IsNullOrEmpty(coverImagePath) && renderContentWrapper ? "flex-lg-row" : articleItemLayoutClass; 282 break; 283 } 284 285 string imageObjectFit = ratio != string.Empty ? "object-fit: cover;" : "object-fit: contain;"; 286 287 string? coverTheme = item.GetString("CoverTheme")?.Replace(" ", "").Trim().ToLower() ?? string.Empty; 288 289 string themeClass = string.Empty; 290 string coverImageWrapperClass = string.Empty; 291 292 if (!string.IsNullOrEmpty(coverTheme)) 293 { 294 articleItemTheme = coverTheme; 295 } 296 297 if (articleItemTheme != string.Empty) 298 { 299 themeClass = " theme " + articleItemTheme; 300 } 301 302 // Exclude self from list - if list has context (Tags) and if is on same page 303 bool excludeSelf = false; 304 bool renderItem = true; 305 306 renderItem = hasListContext && excludeSelf ? renderItem = false : !hasListContext && !excludeSelf ? renderItem : renderItem; 307 308 if (renderItem) 309 { 310 <article class="card border-0 @(string.IsNullOrEmpty(themeClass) ? "gap-3" : null) @articleItemLayoutClass@(themeClass)@(shapeClass) overflow-hidden @LiftOnHover() @ShadowOnHover()" itemscope itemtype="https://schema.org/CreativeWork" style="background-color: var(--swift-background-color)"> 311 312 @if (!string.IsNullOrEmpty(coverImagePath)) 313 { 314 if (Path.GetExtension(coverImagePath).ToLower() == ".svg") 315 { 316 coverImageWrapperClass = !renderContentWrapper ? "d-flex justify-content-center align-items-center h-100 w-100 " : "w-100 "; 317 318 <a class="@(coverImageWrapperClass)@(orderReverseClass)" title="@title" href="@link" tabindex="-1"> 319 <div class="d-flex justify-content-center align-items-center overflow-hidden@(ratioCssClass)" @ratioVariable> 320 @ReadFile(coverImagePath) 321 </div> 322 </a> 323 } 324 else 325 { 326 coverImageWrapperClass = articleItemLayout == "image-top" ? "position-relative" : $"col {orderReverseClass}"; 327 coverImageWrapperClass += renderContentWrapper && articleItemLayout != "image-top" ? " col-lg-5" : string.Empty; 328 329 string figureClass = articleItemLayout == "image-top" ? ratioCssClass : "h-lg-100 ratio ratio-16x9"; 330 ratioVariable = articleItemLayout == "image-top" ? ratioVariable : string.Empty; 331 332 <a class="@coverImageWrapperClass" title="@title" href="@link" tabindex="-1"> 333 <figure class="overflow-hidden m-0 mx-auto @(figureClass)" @ratioVariable> 334 @{ 335 coverImagePath = Dynamicweb.Context.Current.Server.UrlEncode(coverImagePath); 336 imageObjectFit = articleItemLayout != "image-top" ? "object-fit: cover" : imageObjectFit; 337 338 string imgSizeSelector = "50vw"; 339 imgSizeSelector = gridSettings == "1" || carouselSettings == "1" ? "100vw" : imgSizeSelector; 340 imgSizeSelector = gridSettings == "2" || carouselSettings == "2" ? "50vw" : imgSizeSelector; 341 imgSizeSelector = gridSettings == "3" || carouselSettings == "3" ? "33vw" : imgSizeSelector; 342 imgSizeSelector = gridSettings == "4" || carouselSettings == "4" ? "25vw" : imgSizeSelector; 343 imgSizeSelector = gridSettings == "5" || carouselSettings == "5" ? "17vw" : imgSizeSelector; 344 345 string coverImagePathM = $"/Admin/Public/GetImage.ashx?image={coverImagePath}&width=640&format=webp"; 346 string coverImagePathL = $"/Admin/Public/GetImage.ashx?image={coverImagePath}&width=960&format=webp"; 347 string imagePathFallBack = coverImagePathM; 348 349 <img srcset=" 350 @coverImagePathM 640w, 351 @coverImagePathL 960w" 352 src="@imagePathFallBack" 353 sizes="(min-width: 992px) @imgSizeSelector, 100vw" 354 loading="lazy" 355 decoding="async" 356 class="img-fluid image-zoom-lg-1-hover" 357 style="@imageObjectFit; object-position: @cssPosition;" 358 alt="@title"> 359 } 360 </figure> 361 </a> 362 } 363 } 364 365 @if (renderContentWrapper) 366 { 367 <div class="col d-flex flex-column @GetPadding(themeClass)"> 368 <div class="card-body p-0 d-flex flex-column gap-2"> 369 @*Show tag stickers*@ 370 371 @if (!string.IsNullOrEmpty(title)) 372 { 373 <a class="text-decoration-none text-decoration-underline-hover" href="@link"> 374 <h3 class="@titleFontSize mb-0" itemprop="headline">@title</h3> 375 </a> 376 } 377 @if (!string.IsNullOrEmpty(summary)) 378 { 379 <p class="m-0 opacity-75">@summary</p> 380 } 381 382 @*Show tag stickers*@ 383 @GetTagStickers(item) 384 385 @if (showButton) 386 { 387 <div class="mt-auto"> 388 389 @if (!string.IsNullOrEmpty(buttonLabel)) 390 { 391 <a href="@link" class="text-start btn btn-link p-0"> 392 @buttonLabel 393 <span class="icon-auto"> 394 @ReadFile(iconPath + "arrow-right.svg") 395 </span> 396 </a> 397 } 398 else 399 { 400 <a href="@link" class="btn btn-link p-0 lh-1 text-start"> 401 <span class="icon-auto"> 402 @ReadFile(iconPath + "arrow-right.svg") 403 </span> 404 </a> 405 } 406 </div> 407 } 408 409 </div> 410 411 @if (renderArticleInfoWrapper) 412 { 413 <div class="card-footer p-0 pt-3 border-top-0"> 414 <div class="d-flex align-items-center justify-content-between gap-3"> 415 @if (author != null && author != 0) 416 { 417 int authorID = author.Value; 418 var authorUser = Dynamicweb.Security.UserManagement.User.GetUserByID(authorID); 419 string authorImage = !string.IsNullOrEmpty(authorUser?.Image) ? authorUser.Image : string.Empty; 420 string authorImagePath = !string.IsNullOrEmpty(authorUser?.Image) ? $"/Admin/Public/GetImage.ashx?image={authorUser.Image}&width=24&height=24&Crop=0&format=webp" : string.Empty; 421 string authorName = !string.IsNullOrEmpty(authorUser?.Name) ? authorName = authorUser.Name : string.Empty; 422 string authorJobTitle = !string.IsNullOrEmpty(authorUser?.JobTitle) ? authorJobTitle = authorUser.JobTitle : string.Empty; 423 424 <div class="d-flex align-items-center gap-2 fs-8 opacity-75"> 425 426 @if (!string.IsNullOrEmpty(authorImage)) 427 { 428 <img class="img-fluid rounded-circle" src="@authorImagePath" loading="lazy" alt="@authorName" width="24" height="24"> 429 } 430 else 431 { 432 <div class="d-flex align-items-center justify-content-center rounded-circle" style="background-color: rgba(var(--swift-foreground-color-rgb),.25)"> 433 <div class="icon-2 p-1"> 434 @ReadFile(iconPath + "user.svg") 435 </div> 436 </div> 437 } 438 439 <div class="d-flex flex-column lh-1"> 440 @if (!string.IsNullOrEmpty(authorName)) 441 { 442 <span itemprop="author">@authorName</span> 443 } 444 @if (!string.IsNullOrEmpty(authorJobTitle)) 445 { 446 <span class="opacity-75">@authorJobTitle</span> 447 } 448 </div> 449 </div> 450 } 451 452 @if (!string.IsNullOrEmpty(publishedDate)) 453 { 454 455 string articleDateTime = publishedDate; 456 457 <div class="d-flex align-items-center gap-1 fs-8 opacity-75"> 458 <div class="icon-1"> 459 @ReadFile(iconPath + "calendar.svg") 460 </div> 461 <time datetime="@articleDateTime" itemprop="datePublished">@publishedDate</time> 462 </div> 463 } 464 </div> 465 </div> 466 } 467 </div> 468 } 469 </article> 470 } 471 472 473 } 474 475 <!-- CARDS END HERE --> 476 </div> 477 478 @if (!hideSliderNavigation) 479 { 480 <button type="button" title="@Translate("Previous slide")" class="slider-nav" style="z-index:1;"> 481 <span class="visually-hidden">@Translate("Previous slide")</span> 482 </button> 483 <button type="button" title="@Translate("Next slide")" class="slider-nav slider-nav-next" style="z-index:1;"> 484 <span class="visually-hidden">@Translate("Next slide")</span> 485 </button> 486 } 487 @if (indicatorStyle != "slider-indicators-hidden") 488 { 489 <div class="slider-indicators" style="z-index:1;"></div> 490 } 491 492 <script type="module" src="/Files/Templates/Designs/Swift/Assets/js/swiffy-slider.js"></script> 493 <script> 494 window.addEventListener("load", () => { 495 initSlider_@(Model.ID)(); 496 }); 497 498 document.addEventListener("updated.swift.pageupdater", function (data) { 499 initSlider_@(Model.ID)(); 500 }); 501 502 function initSlider_@(Model.ID)() { 503 swift.AssetLoader.Load('/Files/Templates/Designs/Swift/Assets/css/swiffy-slider.min.css', 'css'); 504 window.swiffyslider.initSlider(document.querySelector('#Slider_@Model.ID')); 505 document.querySelector('#Slider_@Model.ID').style.opacity = 1; 506 document.querySelector('#Slider_@Model.ID').style.visibility = "visible"; 507 } 508 </script> 509 510 @if (indicatorStyle != "slider-indicators-hidden") 511 { 512 <script type="module"> 513 const slider = document.querySelector('#Slider_@Model.ID'); 514 const sliderContainer = slider.querySelector('.slider-container'); 515 let slides = sliderContainer.querySelectorAll('article'); 516 const sliderIndicators = slider.querySelector('.slider-indicators'); 517 518 slides.forEach((slide, index) => { 519 const indicator = document.createElement('template'); 520 indicator.innerHTML = ` 521 <button type="button" class="${index == 0 ? "active" : ""}" title='@Translate("Go to slide") ${index + 1}'> 522 <span class="visually-hidden">@Translate("Go to slide") ${index + 1}</span> 523 </button> 524 `; 525 sliderIndicators.appendChild(indicator.content); 526 }); 527 </script> 528 } 529 </div> 530 531 532 </div> 533 } 534 535 @functions{ 536 537 538 539 private string GetTagStickers(ItemViewModel item) 540 { 541 var stickers = string.Empty; 542 543 if (item.GetString("ItemPublisher:Item.SystemName") == "Swift_Article") 544 { 545 var showTags = Pageview.CurrentParagraph.Item["ShowTags"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowTags"] : false; 546 547 if (showTags && GetTags(item).Count >= 1) 548 { 549 stickers += "<div class=\"d-inline-flex flex-wrap gap-1\">"; 550 foreach (var tag in GetTags(item)) 551 { 552 stickers += CreateSticker(tag); 553 } 554 stickers += "</div>"; 555 } 556 } 557 558 559 /* CUSTOM 9a Content type */ 560 if (item.GetString("ItemPublisher:Item.SystemName") == "9a_Content") 561 { 562 563 } 564 /* CUSTOM END */ 565 566 return stickers; 567 } 568 569 570 571 private List<string> GetTags(ItemViewModel item) 572 { 573 var tags = new List<string>(); 574 575 //foreach (var tag in item.GetLoop("ItemPublisher:Item.Tags.Options")) 576 //{ 577 // if (tag.GetBoolean("ItemPublisher:Item.Tags.Option.IsSelected")) 578 // { 579 // tags.Add(tag.GetString("ItemPublisher:Item.Tags.Option.Label")); 580 // } 581 //} 582 583 return tags; 584 } 585 586 587 private string CreateSticker(string label) 588 { 589 string shape = Pageview.CurrentParagraph.Item["ArticleItemShape"] != null ? Pageview.CurrentParagraph.Item["ArticleItemShape"].ToString() : "boxed"; 590 var sticker = $"<span class=\"badge fw-normal shadow-none\" style=\"border: 1px solid rgba(var(--swift-foreground-color-rgb), 0.2);\">{label}</span>"; 591 return sticker; 592 } 593 594 595 private string LiftOnHover() 596 { 597 bool liftOnHover = Pageview.CurrentParagraph.Item["LiftOnHover"] != null ? (Boolean)Pageview.CurrentParagraph.Item["LiftOnHover"] : false; 598 var lift = liftOnHover ? "lift" : null; 599 return lift; 600 } 601 602 private string ShadowOnHover() 603 { 604 bool shadowOnHover = Pageview.CurrentParagraph.Item["ShadowOnHover"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShadowOnHover"] : false; 605 var shadow = shadowOnHover ? "shadow-hover" : null; 606 return shadow; 607 } 608 609 private string GetPadding(string theme) 610 { 611 var padding = !string.IsNullOrEmpty(theme) ? "p-3" : null; 612 return padding; 613 } 614 615 private string GetGap(string theme) 616 { 617 var padding = string.IsNullOrEmpty(theme) ? "gap-3" : null; 618 return padding; 619 } 620 }
Try KeyShot for free
Request your free 14-day trial of KeyShot Studio 3D rendering software and test all its features for quality product design.
Error executing template "Designs/Swift/Paragraph/9a_Content_gates_module.cshtml" System.ArgumentException: field "$facets" was not indexed with SortedSetDocValues at Lucene.Net.Facet.SortedSet.DefaultSortedSetDocValuesReaderState..ctor(IndexReader reader, String field) at Dynamicweb.Indexing.Lucene.LuceneIndexProvider.<get_ReaderState>b__14_0(String path) at Dynamicweb.Indexing.Lucene.LuceneIndexProvider.SearchInternal(IQuery query, QuerySettings settings) at Dynamicweb.Indexing.Queries.IndexQueryProvider.Query(IQuery query, QuerySettings settings) at Dynamicweb.Indexing.Querying.QueryService.Query(IQuery query, QuerySettings settings) at NineAltitudes.CustomCode.NineAContent.ContentClient.NineAContentService.GetResults(Int32 pageSize, IQueryService queryService, IQuery query, Dictionary`2 parameters) at NineAltitudes.CustomCode.NineAContent.ContentClient.NineAContentService.GetContentByTagFilters(Int32 pageAreaId, IEnumerable`1 contentTypes, IEnumerable`1 tagFilters, Int32 pageSize) at CompiledRazorTemplates.Dynamic.RazorEngine_866ad1bd4baa483db592c78e5f8df5c5.GetFacetedContent(ParagraphViewModel model, Int32 maxItems, Int32 pageAreaId, String tagFilter) at CompiledRazorTemplates.Dynamic.RazorEngine_866ad1bd4baa483db592c78e5f8df5c5.ExecuteAsync() at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass23_0.<Run>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using NineAltitudes.CustomCode.NineAContent; 3 @using Dynamicweb.Rendering; 4 @using Dynamicweb.Extensibility; 5 @using Dynamicweb.Frontend; 6 @using System.Linq; 7 @using NineAltitudes.CustomCode.NineAContent.ContentClient; 8 9 @{ 10 const int maxItems = 7; 11 12 string title = Model.Item.GetString("Title"); 13 14 var filter = Dynamicweb.Context.Current.Request.QueryString.Get("filter"); 15 16 var pageView = Dynamicweb.Frontend.PageView.Current(); 17 int currentPageAreaId = pageView.AreaID; 18 19 (var content, var dimensions) = GetFacetedContent(Model, maxItems, currentPageAreaId, filter); 20 21 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 22 var decorations = Model.Item?.GetList("CssDecorations")?.GetRawValue().OfType<string>() ?? Enumerable.Empty<string>(); 23 24 string contentPadding = Model.Item.GetRawValueString("ContentPadding", "none"); 25 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 26 contentPadding = contentPadding == "small" ? "p-3 p-md-3" : contentPadding; 27 contentPadding = contentPadding == "large" ? "p-5 p-md-5" : contentPadding; 28 29 string buttonSize = Model.Item.GetString("ButtonSize") != "regular" ? Model.Item.GetString("ButtonSize") : String.Empty; 30 31 string buttonShape = "rounded-2"; 32 33 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/"; 34 35 string cardTheme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("CardTheme")) ? " theme " + Model.Item.GetRawValueString("CardTheme").Replace(" ", "").Trim().ToLower() : ""; 36 string cardButtonText = Model.Item.GetString("CardButtonText"); 37 string cardButtonStyle = Model.Item.GetString("CardButtonStyle") == "btn-link" ? "btn-link ps-0" : Model.Item.GetString("CardButtonStyle"); 38 string cardButtonSize = Model.Item.GetString("CardButtonSize") != "regular" ? Model.Item.GetString("CardButtonSize") : String.Empty; 39 bool showCardButtonIcon = Model.Item.GetString("CardButtonType") == "icon" || Model.Item.GetString("CardButtonType") == "both"; 40 bool showCardButtonText = Model.Item.GetString("CardButtonType") == "text" || Model.Item.GetString("CardButtonType") == "both"; 41 string cardTitleSize = Model.Item.GetString("CardTitleSize"); 42 string cardShape = Model.Item.GetString("CardShape"); 43 string cardShapeCSS = cardShape == "boxed" ? "rounded-0" : "rounded-4"; 44 45 string ratio = Model.Item.GetString("ImageAspectRatio"); 46 ratio = ratio != "0" ? ratio : string.Empty; 47 string ratioCssClass = ratio != string.Empty ? " ratio" : string.Empty; 48 string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty; 49 50 string secondChildOfGridCSS = content.Count == 5 || content.Count == 7 ? "grid g-col-12 g-col-lg-8" : "grid g-col-12"; 51 string secondChildOfGridChildCSS = content.Count == 5 ? "g-col-12 g-col-md-6" : content.Count == 7 ? "g-col-12 g-col-md-6 g-col-lg-4" : "g-col-12 g-col-md-6 g-col-lg-3"; 52 53 bool gridShouldBeSplit = (content.Count == 7 || content.Count == 5); 54 } 55 56 @functions { 57 58 private (List<Dynamicweb.Frontend.ItemViewModel> content, List<Dynamicweb.Frontend.ItemViewModel> dimensions) GetFacetedContent(ParagraphViewModel model, int maxItems, int pageAreaId, string? tagFilter = null) 59 { 60 var selectedTags = GetSelectedTags(model); 61 62 var contentTypes = model.Item?.GetList("ContentTypes")?.GetRawValue().OfType<string>() ?? Enumerable.Empty<string>(); 63 64 var service = ServiceLocator.Current.GetInstance<INineAContentQueryService>(); 65 var contentWithTags = service.GetContentByTagFilters(pageAreaId, contentTypes, selectedTags, maxItems); 66 67 var availableFilterDimensionPageIds = GetAvailableFilterDimensionPageIds(service, contentWithTags, pageAreaId); 68 var dimensions = GetPagesByPageId(availableFilterDimensionPageIds); 69 70 if (tagFilter != null) 71 { 72 contentWithTags = 73 contentWithTags 74 .Where(x => x.Tags.Any(y => y == tagFilter)) 75 .ToArray(); 76 } 77 78 var localizedTagPageIds = contentWithTags.Select(tag => tag.PageId).Take(maxItems); 79 var content = GetPagesByPageId(localizedTagPageIds); 80 81 return (content, dimensions); 82 } 83 84 private string[] GetSelectedTags(ParagraphViewModel model) 85 { 86 var industry_filters = model.Item?.GetList("Filters_Tags_Industries")?.GetRawValue().OfType<string>(); 87 var vendor_filters = model.Item?.GetList("Filters_Tags_Vendors")?.GetRawValue().OfType<string>(); 88 var domain_filters = model.Item?.GetList("Filters_Tags_Domains")?.GetRawValue().OfType<string>(); 89 var solution_filters = model.Item?.GetList("Filters_Tags_Solutions")?.GetRawValue().OfType<string>(); 90 var product_filters = model.Item?.GetList("Filters_Tags_Products")?.GetRawValue().OfType<string>(); 91 var country_filters = model.Item?.GetList("Filters_Tags_Countries")?.GetRawValue().OfType<string>(); 92 var service_filters = model.Item?.GetList("Filters_Tags_Services")?.GetRawValue().OfType<string>(); 93 var topic_filters = model.Item?.GetList("Filters_Tags_Topics")?.GetRawValue().OfType<string>(); 94 95 var allTags = (industry_filters ?? []) 96 .Concat(vendor_filters ?? []) 97 .Concat(domain_filters ?? []) 98 .Concat(solution_filters ?? []) 99 .Concat(product_filters ?? []) 100 .Concat(country_filters ?? []) 101 .Concat(service_filters ?? []) 102 .Concat(topic_filters ?? []) 103 .ToArray(); 104 105 return allTags; 106 } 107 108 private IEnumerable<int> GetAvailableFilterDimensionPageIds(INineAContentQueryService service, INineATaggedContent[] contentWithTags, int pageAreaId) 109 { 110 var interactiveFilter = Model.Item?.GetString("Filter_Interactive_Tag_Dimension"); 111 112 if (string.IsNullOrWhiteSpace(interactiveFilter)) 113 return []; 114 115 var interactiveFilterDimension = NineATag.FromPrefix(interactiveFilter); 116 if (interactiveFilterDimension == null) 117 return []; 118 119 var dimensionsTagIds = contentWithTags.GetUsedTagsWith(interactiveFilterDimension); 120 if (!dimensionsTagIds.Any()) 121 return []; 122 123 var tagContent = service.GetContentByTagIds(pageAreaId, dimensionsTagIds, contentWithTags.Length); 124 var localizedTagPageIds = tagContent.Select(tag => tag.PageId); 125 126 return localizedTagPageIds; 127 } 128 129 private List<Dynamicweb.Frontend.ItemViewModel> GetPagesByPageId(IEnumerable<int> pageIds) 130 { 131 var lists = new List<Dynamicweb.Frontend.ItemViewModel>(); 132 133 if (pageIds.Any()) 134 { 135 foreach (var tagPageID in pageIds) 136 { 137 var page = Dynamicweb.Content.Services.Pages?.GetPage(Dynamicweb.Core.Converter.ToInt32(tagPageID)) ?? null; 138 var viewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(page)?.Item ?? null; 139 140 if (viewModel != null) 141 { 142 lists.Add(viewModel); 143 } 144 } 145 } 146 return lists; 147 148 } 149 } 150 151 <div class="item_@Model.Item.SystemName.ToLower() @theme @contentPadding"> 152 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 153 { 154 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "h2"); 155 string headingLevel = Model.Item.GetString("HeadingLevel", "h2"); 156 string headingLevelStart = $"<{headingLevel} class=\"{titleFontSize} mb-4\" id=\"gates_{@Model.PageID}\">"; 157 string headingLevelStop = $"</{headingLevel}>"; 158 159 @headingLevelStart 160 @Model.Item.GetString("Title") 161 @headingLevelStop 162 } 163 164 <div class="d-flex gap-1 gap-sm-3 my-3 flex-wrap "> 165 @if (dimensions != null) 166 { 167 var relativeUri = Dynamicweb.Context.Current.Request.RawUrl; 168 var host = Dynamicweb.Context.Current.Request.Url.Host; 169 if (host.Contains("localhost")) 170 { 171 host = host + ":" + Dynamicweb.Context.Current.Request.Url.Port; 172 } 173 174 var newUri = new Uri(Dynamicweb.Context.Current.Request.Url, relativeUri); 175 176 @foreach (var category in dimensions) 177 { 178 var tagId = category.GetString("tag_id"); 179 var curRef = $"{newUri.Scheme}://{host}{newUri.AbsolutePath}"; 180 var link = $"{curRef}?filter={tagId}#gates_{Model.PageID}"; 181 182 183 string isActive = filter == tagId ? "active " : ""; 184 string isActiveBtnType=filter == tagId ? "btn-secondary":"btn-primary"; 185 <div> 186 <a class="btn @isActiveBtnType @buttonSize @buttonShape @isActive text-nowrap" href="@link"> @category.GetString("Title")</a> 187 </div> 188 } 189 190 @if (!string.IsNullOrEmpty(filter)) 191 { 192 var curRef = $"{newUri.Scheme}://{host}{newUri.AbsolutePath}"; 193 var link = $"{curRef}#gates_{Model.PageID}"; 194 195 <div> 196 <a class="btn btn-link @buttonSize @buttonShape" href="@link" style="padding-block: var(--swift-button-primary-padding-y);"> @Translate("Clear Filter")</a> 197 </div> 198 } 199 200 } 201 @if (Model.Item.GetBoolean("Show_GoTo_Button")) 202 { 203 var gotoButtonText = Model.Item.GetString("GoTo_Button_Text"); 204 var link = Model.Item.GetString("GoTo_Link"); 205 206 @if (!string.IsNullOrEmpty(gotoButtonText) && !string.IsNullOrEmpty(link)) 207 { 208 <a href="@link" class="btn btn-link ms-auto @buttonSize @buttonShape" style="padding-block: var(--swift-button-primary-padding-y);">@gotoButtonText</a> 209 } 210 } 211 212 </div> 213 214 215 <div class="grid g-col-12" style="background-color:transparent"> 216 @{ 217 int itemCount = 0; 218 } 219 @foreach (ItemViewModel item in content) 220 { 221 itemCount++; 222 223 //if the there are 5 or 7 items, the first item should fill up more space 224 @if (itemCount==1 && gridShouldBeSplit) 225 { 226 @:<div class="g-col-12 g-col-lg-4"> 227 } 228 229 // If there are 5 or 7 items, the rest of the items should be in a seperate grid. 230 @if ((itemCount==2 && gridShouldBeSplit)) 231 { 232 @:<div class="@secondChildOfGridCSS"> 233 } 234 235 // All items that are not the first one, in case case there are 5 or 7 items, should have their own classes. 236 //Or if there aren't 5 or 7 items, then all should have this css 237 @if ((itemCount!=1 && gridShouldBeSplit) || !gridShouldBeSplit) 238 { 239 240 @:<div class="@secondChildOfGridChildCSS"> 241 242 } 243 244 <article class="card h-100 border-0 @cardTheme @cardShapeCSS overflow-hidden shadow-hover" itemscope="" itemtype="https://schema.org/CreativeWork" style="background-color: var(--swift-background-color)"> 245 246 @if (!String.IsNullOrEmpty(item.GetString("Image"))) 247 { 248 <a class="position-relative" title="@item.GetString("Title")" href="@item.Link" tabindex="-1"> 249 <figure class="overflow-hidden m-0 mx-auto @ratioCssClass" @ratioVariable> 250 @{ 251 var coverImagePath = Dynamicweb.Context.Current.Server.UrlEncode(item.GetString("Image")); 252 string image = item.GetString("Image"); 253 254 string coverImagePathM = $"/Admin/Public/GetImage.ashx?image={coverImagePath}&width=640&format=webp"; 255 string coverImagePathL = $"/Admin/Public/GetImage.ashx?image={coverImagePath}&width=960&format=webp"; 256 string imagePathFallBack = coverImagePathM; 257 258 <img srcset=" 259 @coverImagePathM 640w, 260 @coverImagePathL 960w" 261 src="@imagePathFallBack" 262 sizes="(min-width: 992px) 25vw, 100vw" 263 loading="lazy" 264 decoding="async" 265 class="img-fluid image-zoom-lg-1-hover" 266 style="object-fit:cover; object-position: 50% 50%;" 267 alt="@item.GetString("Title")"> 268 } 269 </figure> 270 </a> 271 } 272 273 <div class="col d-flex flex-column p-3"> 274 <div class="card-body p-0 d-flex flex-column gap-2"> 275 <a class="text-decoration-none text-decoration-underline-hover" href="@item.Link"> 276 <h3 class="@cardTitleSize mb-0" itemprop="headline"> @item.GetString("Title")</h3> 277 </a> 278 279 @if (!String.IsNullOrEmpty(item.GetRawValueString("Summary"))) 280 { 281 <p class="m-0 opacity-75">@item.GetRawValueString("Summary")</p> 282 } 283 284 @if (!String.IsNullOrWhiteSpace(cardButtonText)) 285 { 286 <div class="mt-auto"> 287 <a href="@item.Link" class="btn @cardButtonStyle @cardButtonSize lh-1 text-start"> 288 289 @if (showCardButtonIcon) 290 { 291 <span class="icon-auto"> 292 @ReadFile(iconPath + "arrow-right.svg") 293 </span> 294 } 295 296 @if (showCardButtonText) 297 { 298 <span>@cardButtonText</span> 299 } 300 </a> 301 </div> 302 } 303 </div> 304 305 <div class="card-footer p-0 pt-3 border-top-0"> 306 <div class="d-flex align-items-center justify-content-between gap-3"> 307 308 @if (!String.IsNullOrEmpty(item.GetString("PublishedDate")) && item.GetDateTime("PublishedDate").Year != 1900 && item.GetDateTime("PublishedDate") != DateTime.MinValue) 309 { 310 string articleDateTime = item.GetDateTime("PublishedDate").Year + "-" + 311 item.GetDateTime("PublishedDate").Month + "-" + item.GetDateTime("PublishedDate").Day; 312 string publishedDate = item.GetDateTime("PublishedDate").ToShortDateString(); 313 314 <div class="d-flex align-items-center gap-1 fs-8 opacity-75"> 315 <div class="icon-1"> 316 @ReadFile(iconPath + "calendar.svg") 317 </div> 318 <time datetime="@articleDateTime" itemprop="datePublished">@publishedDate</time> 319 </div> 320 } 321 </div> 322 </div> 323 </div> 324 </article> 325 326 @if ((itemCount!=1 && gridShouldBeSplit) || !gridShouldBeSplit) 327 { 328 @:</div> 329 } 330 @if ((itemCount==content.Count && gridShouldBeSplit)) 331 { 332 @:</div> 333 } 334 @if (itemCount==1 && gridShouldBeSplit) 335 { 336 @:</div> 337 } 338 } 339 </div> 340 </div> 341
Frequently asked questions:
KeyShot Studio is the easiest and fastest software for 3D rendering and animation on the market. In a few steps, you can create incredible images of your 3D models:
- Import your 3D model Import SolidWorks, Solid Edge, SketchUp, Alias, PTC Creo, Rhino, Pro/E, IGES, STEP, FBX, OBJ, or 3D data files directly. With the widest 3D format support and numerous plugins, importing your model is easy and efficient.
- Paint your model Drag and drop any of the over 600 preset materials and apply it to your model. The real-time view will show you instantly how the material looks on your model with exact color and lighting.
- Choose the lighting Adjust the lighting of your scene to highlight the best features of your model. KeyShot Studio offers a wide range of lighting options, including intensity, angle, and color adjustments. You will see how it looks in real-time.
- Choose a background Select a background that complements your model. KeyShot Studio offers a variety of background options, from solid colors to images and HDRI environments. You can even upload your own images to customize your scene.
- Adjust your camera Framing your shot is as easy as using a real camera. Adjust the angle and distance, control the perspective with the focus and field aperture options, and add depth of field to your scene.
KeyShot supports a wide range of 3D file formats, including but not limited to: SolidWorks, Solid Edge, SketchUp, Alias, PTC Creo, Rhino, Pro/E, IGES, STEP, FBX, OBJ, and many more. This extensive compatibility ensures that you can easily import your 3D models from various software applications into KeyShot for rendering and animation.

Get in touch
Digital business transformation is what we do. Making sure organizations are ready to deliver for the end customer of today and those of tomorrow. Thanks to our industry expertise, we are able to combine speed and quality into your digital transformation journey.