Try our conversational search powered by Generative AI!

Using IList in Blocks

Vote:
 

Hi,

I've seen a lot of examples but not a complete one, where you can use (implement) a list of preferable Url type in block.

Every tutorial that I have seen so far is for implementing one value inside the block property. So is there an example of succesfull block with a list of strings, XString or URL there ?

Thinking of something like this:

 [ContentType(DisplayName = "E-Commerce Block", GUID = "61435bf7-7792-4400-a055-4f8094195fa1", Description = " E-Commerce Licenses", GroupName = ContentTypeGroupNames.FooterBlocks)]
    public class ECommerceBlock : BlockData
    {

        [CultureSpecific]
        [UIHint("Image")]
        [Display(
          Name = "Trusted Shops URL",
          Description = "Enables Trusted Shop as trusted ecommerce license",
          Order = 50
          )]
        public virtual IList imgUrl { get; set; }
    } 
}
#196169
Aug 21, 2018 10:48
Vote:
 

You can create your own types for the ILists which can contain standard episerver properties in and just appear as a modal window for populating. 

#196188
Aug 21, 2018 15:22
* 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.