November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Does anybody know how to access the settings made in admin mode for the property by code?
I would like to read them if defined in my factory
[UIHint("PublicationType")]
[BackingType(typeof (PropertyDropDownList))]
[Display(Name = "Publikationstyp", Order = 1, AutoGenerateField = true, Description = "Välj publikationstyp")]
public virtual string PublicationType { get; set; }
[UIHint(UIHint.MediaFile)]
[Display(Name = "Pdf")]
public virtual ContentReference PdfFile { get; set; }
[EditorDescriptorRegistration(TargetType = typeof (string), UIHint = "PublicationType")]
publicclassPublicationTypeEditorDescriptor : EditorDescriptor
{
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
{
SelectionFactoryType = typeof (PublicationTypeFactory);
ClientEditingClass ="epi-cms/contentediting/editors/SelectionEditor";
base.ModifyMetadata(metadata, attributes);
}
}
privateclassPublicationTypeFactory : ISelectionFactory
{
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata)
{
//GET CODE FROM ADMIN SETTINS
//ELSE SHOW DEFAULT
var types = new List<SelectItem>();
types.Add(new SelectItem() {Value = "Rapporter", Text = "Rapporter"});
types.Add(new SelectItem() {Value = "Skrivelser", Text = "Skrivelser"});
types.Add(new SelectItem() {Value = "Informationsmaterial", Text = "Informationsmaterial"});
return types;
}
}
Anyone???
I want to use an standard dropdown and let the admins decide the values.
But I want to prepoulate the list with data that today is the most recent values. We have a lot of enironments and the list of values is long.
So I tried to enter the values in the global/custom settings dialog in admin mode under edit propert.
The problem is that the values don get exported tho the other environments when i export the page/pagetype.
Any Ideas?