Download images from assets from HTML Anchor tag

Suppose the front-end code wants supply a way to download images from the assets folder. Consider the following code: Assuming that 127.0.0.1:5500 is your EPiServer instance, you can say that the image will be downloaded. Note that download anchor attribute will work if the url is from the same origin of the http request. ForContinue reading “Download images from assets from HTML Anchor tag”

Missing Group on Set Access Rights

Context: Episerver authentication integrated with Azure Active Directory B2C; A fresh installation of Episerver; Virtual roles configured to map Roles configured on AD; Logged only with an account that was mapped for a AD role named ‘SpecialMegaRole’ 😉 Another virtual role was mapped for an AD role named ‘NotSoSpecialRole’ Objective : Set the access rightsContinue reading “Missing Group on Set Access Rights”

Add Metafields to OrderSummary view

I need to add extra information on each LineItem of the order. But also to see it on the OrderSummary view on the Commerce UI. Please comment if i can implement a better solution than following approach, because i thought that it could be a fast solution by changing the xml file were we defineContinue reading “Add Metafields to OrderSummary view”

The view ‘index’ or its master was not found or no view engine supports the searched locations. From IISExpress to IIS

Consider the following scenario: Developing with debug compilation and using IIS Express. Everything works fine without license. Episerver allows development under those circumstances. But if you deploy to a new IIS site or even to Azure web app and you set compilation without debug, because you probably published with Release configuration: The site will showContinue reading “The view ‘index’ or its master was not found or no view engine supports the searched locations. From IISExpress to IIS”

Start from empty folder to a running Episerver CMS and ECommerce

Assumptions: this post was written at 23/10/2019 with Visual Studio 2019 and Episerver CMS Visual Studio Extension version 11.5.0.412. The idea is to create a running empty site with CMS and ECommerce. Ensure that you have Episerer nuget feed configure to https://nuget.episerver.com/feed/packages.svc/ Lets create a new empty Episerver CMS site: With this we start toContinue reading “Start from empty folder to a running Episerver CMS and ECommerce”

Setting icons for content types

When creating new types instances, such as pages or blocks, we get a lot of help from the CMS UI identifying which type we want. But, to offer better experience to the editors, it would be much nice that these types could be present with an image. Episerver recomend 120×90 dimention for each icon, butContinue reading “Setting icons for content types”

Sharing properties between content types, and action methods between controllers

It is a good idea to provide derived types from the Episerver content types PageData, BlockData and MediaData to share common properties among all the pages on the site. We should also consider to use that also on the controllers. Considering the class diagram: We can start to implement the Base[Classes] and Standard and StartContinue reading “Sharing properties between content types, and action methods between controllers”

Update an existing page property

Using methods from IContentLoader or IContentRepository to get existing data, it will be returned as read-only version. If you try to update and save it, you will get a ReadOnly exception, although the model has the public set available Since the API assume that most of the time are read operations, than it shares theContinue reading “Update an existing page property”