builder.describe widget_title

Topics: Writing modules
May 14, 2014 at 7:53 PM
Hi,
I have a class that implements IShapeTableProvider and want to add a wrapper to the title of the widgets.
I can do it with Describe("Widget") and then add a wrapper to the full widget shape. But I'd like to be able to add the wrapper to the title only, so that users of my module does not get affected by my wrapper template.
Maybe the name I'm using for the shape is wrong ("Fields_Common_Text") , or maybe this can't be done at all. I don't know. Any Ideas?

Here is my code:
    public class MyCustomWrappers : IShapeTableProvider
    {
        public void Discover(ShapeTableBuilder builder)
        {   
            // THIS WORKS
            builder.Describe("Parts_Common_Body").OnDisplaying(displaying =>
            {         
                    displaying.ShapeMetadata.Wrappers.Add("MyWrapers_Body_Wrapper");
            });

            // THIS WORKS
            builder.Describe("Parts_Title").OnDisplaying(displaying =>
            {
                    displaying.ShapeMetadata.Wrappers.Add("MyWrapers__Title_Wrapper");
            });

            // THIS WORKS
            builder.Describe("Widget").OnDisplaying(displaying =>
            {
                    displaying.ShapeMetadata.Wrappers.Add("MyWrapers_Widget_Wrapper");

            });

            // THIS DOES NOT WORK***********************
            builder.Describe("Fields_Common_Text").OnDisplaying(displaying =>
            {             
                    displaying.ShapeMetadata.Wrappers.Add("MyWrapers_TextField_Wrapper");
             
            });

        }
    }