Try our conversational search powered by Generative AI!

Dynamically assign page, page tree and block icons

Vote:
 

Hello Everone !

I have multiple questions to tackle the scenarios where I want to change the Page/Block icon in editor view based on certain content property value.
If it's 100% possible to do it then can someone share the approach to follow. 
I tried the dojo from available sample to change the icon of PageTree and it worked for me but the same code is not working for blocks (private/shared block.)


#302569
May 29, 2023 17:57
Vote:
 

Hi Pradeep,

Are you creating a UIDescriptor for the block?

Using this should allow you to customize the UI, there is a blog article already around how to perform this here

Paul

#302639
May 30, 2023 8:32
Pradeep Vishwakarma - May 30, 2023 9:32
Thanks Paul McGann !

I tried that but wanted to change icons based on content properties. What I understand till now is, If we use UIDescriptor then it's applicable for specified types which is not suitable for my usecase.

I'm trying to achieve some visual apperence to mark (same type)blocks with different icons based on how it's configured.
Paul McGann (Netcel) - May 31, 2023 8:23
Ah, yes I see what you are trying to achieve. I think the only solution that would work and be totally controllable would be a custom component. This however would duplicate possibly the existing functionality within the site.
Pradeep Vishwakarma - May 31, 2023 8:51
Thanks ! That means, it's not out of the box functionality that can be leveraged. Any example or reference which I can follow to create custom component.
Paul McGann (Netcel) - Jun 02, 2023 8:37
Jon D Jones has a tutorial on how to create a custom component / widget https://www.jondjones.com/learn-episerver-cms/episerver-developers-tutorials/episerver-customizing-episervers-ui/how-to-render-a-custom-view-in-the-episerver-asset-panel/. There are some useful link on David Knipes blog around Dojo and customizing the UI https://www.david-tec.com/2014/08/EPiServer-Dojo-Useful-links/.
Pradeep Vishwakarma - Jun 02, 2023 9:08
I will take a look and thanks for your time and support. Much appreciated !!!
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.