Dynamic Content Labels

Vote:
 

Good day,

I am in search of the attribute or documentation on how to change the dynamic content properties labels that show up in the ui.  I know I have seen this before but for the life of me cannot find or remember how it was done.  Right now, the labels are just the property names but would like attle more legible label.  Thanks in advance.

#61576
Sep 24, 2012 15:04
Vote:
 

Hi,

Here is how you can translate DC Plugins http://blog.fredrikhaglund.se/blog/2011/06/28/dynamic-content-in-episerver-cms-6-r2/.

Hint: LanguagePath = "/dynamiccontent/hello" in the attribute DynamicContentPlugIn of the plugin.

#61579
Sep 24, 2012 15:38
Vote:
 

Thanks Johan, but is there a way without out doing it with languages?  Just out of curiousity.

#61580
Sep 24, 2012 15:52
Vote:
 

I think you can override the Properties property and add your properties manually:

 

public override EPiServer.Core.PropertyDataCollection Properties
{
    get
    {
        if (base.Properties == null)
        {
            PropertyDataCollection pdc = new PropertyDataCollection();
            pdc.Add("A property with whitespace", new PropertyLongString());

            SetProperties(pdc);
        }

        return base.Properties;
    }
}

    

#61581
Sep 24, 2012 15:57
Vote:
 

Brilliant.  Exactly what i was I was searching for.  Thanks Johan

#61582
Sep 24, 2012 16:00
Vote:
 

pdc.Add("A property with whitespace", is not a good idea. Some javascript functions use the name, and those will not work when you have whitespace in the name

#61593
Sep 24, 2012 17:59
Vote:
 

So i might have spoke prematurely.  So what is the best way change the labels for properties in dynamic content in 6r2

#61594
Sep 24, 2012 18:16
Vote:
 
By translating them ;)
#61595
Sep 24, 2012 18:21
Vote:
 

Ahhh, We got a comedian in the house :)

#61596
Sep 24, 2012 18:23
Vote:
 

I know the lang files are a hassle. But I don't think there is any other ways.

#61597
Sep 24, 2012 18:26
Vote:
 

They sure are, but like you said, it is probably the best way to do it.   I will stop being lazy and do it with the language files.  I do appreciate your help though.  Much appreciated!!!

#61598
Sep 24, 2012 18:27
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.