Displaying properties in EPIserver

Hello world!

I have a question about the design of  properties in epi .in the mode “all properties”.

Properties  type are seen :

 String :

 

ISelectionFactory:

 

Date Time:

 

Html :

 

But in “on page editing” the properties are seen :

 Date time :

 

And after click on text box , open popup  :

 DateTime:

 

ISelectionFactory:

 

Block :

 

Html:

After click to text box  open the “button”:

 

Can we change the  in “on page editing” properties to look like the “all properties” mode ?

(that will not open popup)

 

We add the property to index.cshtml :

Ex: @Html.PropertyFor(n => n.CurrentPage.MainPicture)

Thanks.

#148611 May 18, 2016 12:11
  • To change this behaviour you need to change uiWrapperType to inline.

    You could use:

    1) CustomEditorSetting

        [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
        public class InlineAttribute : Attribute, IMetadataAware
        {
            public void OnMetadataCreated(ModelMetadata metadata)
            {
                var extendedMetadata = metadata as ExtendedMetadata;
                if (extendedMetadata != null)
                {
                    extendedMetadata.CustomEditorSettings["uiWrapperType"] = "inline";
                }
            }
        }

    and then on your model:

     public class StandardPage : SitePageData
        {
            [Inline]
            public virtual string Prop1 { get; set; }
        }

    2)  Add data-epi-property-edittype attribute in your markup. More info about this can be found here: http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/8/Editing/Editing/

    I had no time to test those solutions.

    In the documentation you can find: "Dijit widgets cannot be used inline.", so I'm not sure if you could change all of those properties to inline.

    #148625 May 18, 2016 19:08