Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

PageType preview thumbnail from other project



as we use multible projects in one solution

/... some stuff in here

I want to place the PageType or BlockType Prevview Icons inside the "ModulesProject/Modules" path. But when i try to accesss them with the annotation in the PageController


it can't be found in MyOptimizely. I tried with

  <Content Include="Modules\Pages\Standard\Assets\*.*">

in the moduleproject.csproj, but the "PageIcons" just don't appear.

Is it possible to place the "Block"-Thumbnails inside the ModulesProject at all, or do I have to tell some CI-Pipeline to copy the stuff for me?

Have a great week,


Jan 09, 2023 9:31

It's the content type you should add the ImageUrl attribute to, not the controller.

Edited, Jan 09, 2023 14:40

Yes you are right. I had this in the PageTypeModel. Please ignore the PageController ;-)

namespace Modules.Pages.Standard.Models
        DisplayName = "Standard Page",
        Order = 1)]
    public class StandardPage : PageData


Edited, Jan 09, 2023 14:56

Pretty sure you need to make the images emedded resources 

Jan 10, 2023 0:40

You don't, but you need to put them where the static file middleware can serve them (or configure the middleware to use the location where they are now).

Jan 10, 2023 7:33

How do I copy the stattic files to the location. I thought the "<CopyToOutputDirectory>Always</CopyToOutputDirectory>" did the trick. Even with a destination folder set, the file isn't there.

Jan 10, 2023 9:09

<CopyToOutputDirectory> element has an effect mostly in the current project. You can achieve this with build actions inside .csproj file. But this might work only on local development environment.

I needed to copy modules files to test Alloy sample app in my package solution (normally it would be done while installing NuGet package) - but locally, to avoid manual copy, I added this snippet to my .csproj file.

Jan 19, 2023 17:22
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.