Blog posts by Dejan Caric2022-01-21T15:58:09.0000000Z/blogs/Dejan-Caric/Optimizely WorldHow to set PrincipalInfo.CurrentPrincipal in Optimizely CMS 12https://dejan.blog/how-to-set-principalinfo-currentprincipal-in-optimizely-cms-12/2022-01-21T15:58:09.0000000ZBack in the days, we could use PrincipalInfo.CurrentPrincipal = PrincipalInfo.CreatePrincipal(...). In CMS 12, PrincipalInfo.CurrentPrincipal has become read-only.Optimizely Forms - How to generate Submitted From Page Links instead of IDshttps://dejan.blog/optimizely-forms-how-to-generate-submitted-from-page-links-instead-of-ids/2021-11-08T06:53:00.0000000ZWhen exporting Optimizely Form submissions in XLSX format, Optimizely will export page IDs instead of proper page links. This blog post will show you how to extend the XLSXDataExporter and export page links instead of just IDs.Optimizely - Singleton Pageshttps://dejan.blog/optimizely-singleton-pages/2021-08-22T13:56:03.0000000ZWhen developing Optimizely websites, we usually have to create single-instance page types like Settings Page, Checkout Page, etc. There are many ways to implement this, so let's see the most popular ones.Optimizely World Community Stats 2021https://dejan.blog/optimizely-world-community-stats-2021/2021-08-08T13:08:43.0000000ZWhich companies have the most CMS and Commerce certified developers? Who are the top 100 contributors? Check out the latest Optimizely World Community Stats for 2021!How to delete expired prices in Optimizely Commercehttps://dejan.blog/how-to-delete-expired-prices-in-optimizely-commerce/2021-08-08T10:07:09.0000000ZEpiserver (now Optimizely) doesn't have any built-in scheduled jobs for deleting expired prices. So even though expired prices are not returned when using IPriceService, the PriceDetails table can become pretty big over time, and you might be asked to do some clean-up anywayOptimizely - managing users from the codehttps://dejan.blog/optimizely-managing-users-from-the-code/2021-08-03T16:29:07.0000000ZA list of useful code snippets for unlocking and creating user accounts from the code.Testing your Content Types for the missing AllowedTypes attributehttps://www.dcaric.com/blog/testing-your-content-types-for-the-missing-allowedtypes-attribute2019-10-02T16:49:59.0000000ZWhen defining new content types, we usually decorate all page types with the AvailableContentTypes attribute and all ContentAreas with the AllowedTypes attribute. Here's how you can unit-test your content types for the missing AllowedTypes and AvailableContentTypes attributes.Testing your Content Types for the missing AllowedTypes attributehttps://www.dcaric.com/blog/testing-your-content-types-for-the-missing-allowedtypes-attribute2019-10-02T14:49:59.0000000ZWhen defining new content types, we usually decorate all page types with the AvailableContentTypes attribute and all ContentAreas with the AllowedTypes attribute. Here's how you can unit-test your content types for the missing AllowedTypes and AvailableContentTypes attributes.Episerver World Community Stats 2019https://www.dcaric.com/blog/episerver-world-community-stats-20192019-03-11T18:18:15.0000000ZA list of top community members by CRP points, based on publicly available data from Episerver World.Creating Episerver Forms programmaticallyhttps://www.dcaric.com/blog/creating-episerver-forms-programmatically2019-03-06T13:21:40.0000000ZI recently had to automate the process of creating Episerver Forms. In this blog post, I will show you how to create Episerver Forms from the code.Scheduled Jobs Cleaner for Episerverhttps://www.dcaric.com/blog/scheduled-jobs-cleaner-for-episerver2018-11-10T08:18:37.0000000ZCleaning up the tblScheduledItemLog and tblScheduledItem tables is a boring task, and sometimes we don't have direct access to the production database. For that reason, I’ve created an add-on that automatically removes ghost scheduled jobs from an Episerver database.Application Logging in Episerver DXChttps://www.dcaric.com/blog/application-logging-in-episerver-dxc2018-10-21T21:12:34.0000000ZIn standard DXC Service setup, application logs are stored in BLOB storage with 90 days retention. They can be inspected in the PaaS portal using custom Log Stream or downloaded in CSV format for offline analysis. DXC Service comes with an Application Insights account, which can be used as a nice alternative to standard application logging.Property Name Overlay in On-Page Editing modehttps://www.dcaric.com/blog/property-name-overlay-in-on-page-editing-mode2018-08-20T12:45:48.0000000ZIn On-Page Editing mode, Episerver will create a blue border around all editable properties. This feature is very useful. However, if you have a lot of properties on the page, it may be challenging to locate the correct property, and editors may be using All Properties mode more often than On-Page Editing.Testing Your Visual Studio Solutions for Files That Are Missing or Not Includedhttps://www.dcaric.com/blog/testing-your-visual-studio-solutions-for-files-that-are-missing-or-not-included2018-04-11T22:43:21.0000000ZWhen some files are missing in a git repository, or they don't have the correct Build Action in the project, a build server may deploy a bad artifact to the production environment. One way to detect this and stop bad deploys is to set up unit tests.Hiding properties in EPiServer edit mode based on the language branchhttps://www.dcaric.com/blog/hiding-properties-in-episerver-edit-mode-based-on-the-language-branch2018-02-12T21:51:35.0000000ZBuilding a multi-language website is always challenging. Among other things, we need to think about date formats, language analyzers, and full-text search. However, we must also not forget the site editors and provide them the best possible editing experience.Creating EPiServer Page Types using ReSharper File Templateshttps://www.dcaric.com/blog/creating-episerver-page-types-using-resharper-file-templates2018-01-02T15:57:29.0000000ZWhen creating new page types, developers mostly use the EPiServer CMS Visual Studio Extension or copy and paste the code from existing files. In this blog post, I’ll show you how to create EPiServer page types using ReSharper file templates. Once you learn all the shortcuts, it becomes much faster to generate code using ReSharper, rather than copy and pasting.Retrieving Available Content Types in EPiServerhttps://www.dcaric.com/blog/retrieving-available-content-types-in-episerver2017-12-12T17:14:24.0000000ZAfter a few development iterations it can be difficult to keep an overview of all content types and their properties. We can always look in Visual Studio or click through different menus in edit and admin mode, but that’s just too time-consuming. It would be nice to have all that information in one place, in a user-friendly format, and be able to filter and export the data to a PDF file.Retrieving file URL from edit modehttps://www.dcaric.com/blog/retrieving-file-url-from-edit-mode2017-10-29T19:34:53.0000000ZMany people wonder how to retrieve the file URL from edit mode. I’ve created an add-on which provides a quick and easy way to do that.Logging to Console using Log4Nethttps://www.dcaric.com/blog/logging-to-console-using-log4net2017-09-12T09:56:45.0000000ZLogging can be very useful when debugging C# code. ColoredConsoleAppender logs all messages to the console and highlights error, info, and debug messages with different colors, which makes the debugging experience a bit more pleasant.Removing extra DIVs from EPiServer Content Areashttps://www.dcaric.com/blog/removing-extra-divs-from-episerver-content-areas2017-08-02T17:32:24.0000000ZThe default ContentAreaRenderer implementation renders div elements around the content area and every content area item. It is possible to control the rendering of wrapping elements, but not to disable them completely.