Sitecore custom droplist

1.2k Views Asked by At

I have POC for a custom droplist in Sitecore 7.0 but when i do absolutely the same in Sitecore 7.1 it does not work. Basically what I have is:

  1. In core db under the "field types/Custom field types" I have my custom field type pointing to the correct assembly and class.
  2. In my .net project I have class DroplistCustom deriving ValueLookupEx. It has overridden GetItems function. Here is the code, but I don't think it is necessary because it works.
public class DroplistCustom : MultilistEx
{
    protected override Item[] GetItems(Item current)
    {
        string query = String.Format("{0}[@@templateid = '{1}' and @@id= '{2}']", this.Source, current.TemplateID, current.ID);
        this.Source = query;
        return base.GetItems(current);
    }
}

3, I use the new type in a template with a source like query:fast:/...

Do not focus on the query it works!

Any suggestions?

2

There are 2 best solutions below

1
Mark Cassidy On

My first guess would be, that the SPEAK UI changes in 7.1 is messing with that field. There is a config file; \App_Config\Include\Sitecore.Speak.config. My first choice would be to rename this file to .disabled, and see if it makes a difference.

Brian Pedersen blogs about it here: http://briancaos.wordpress.com/2014/07/02/disable-sitecore-speak-dialogs/

0
IIvanov On

Found what cause the problem. Everything works fine beside the fact that in SC 7.1 it is important to place your custom field types under the predefined folders. I moved my DroplistCustom form my folder "Custom Field Types" to "List Types" and it worked. Thanks for the help!