We have moved to GitHub Issues
Created by Kenn Jacobsen 10 Dec 2017, 10:50:06 Updated by Sebastiaan Janssen 24 Jul 2018, 14:16:46Tags: PR
When using property editors that do not contain simple text values in Nested Content label templates, the labels look rather bad. In my concrete example I've used a richtext editor in the label template, which results in the entire text (including escaped HTML tags) being applied as the label template (see the attached screenshot).
I suspect when using a content picker in the label template, the result would be the ID of the picked content - not the name, which would be reasonable to expect (disclaimer: I haven't tested this).
I suggest that:
I realize that I can code my way out of this by creating my own angular filters to format the label templates (and I have done just that), but it seems to me that this is a general issue that should be solved in the core.
For the actual implementation there is a lot of inspiration to find here: https://github.com/kgiszewski/Archetype/blob/c22a2623c2d9d3e1c100db954f6f550aca06965e/app/services/archetypeLabelService.js#L187
Content pickers are already supported in the core by using ncNodeName filter (this was added in nested content 0.4)
See docs of nested content : https://github.com/umco/umbraco-nested-content/blob/develop/docs/developers-guide.md#name-template
I just created a PR so it can also be used on media and member pickers for this issue : http://issues.umbraco.org/issue/U4-11154
I already did a PR which includes media, members and a few more... :)
I did not notice that one. I see we solve things differently in the ncNodeName filter.
Yeah the UID contains the type explicitly :)
But that does not work for pickers still using integer id's
Nope; you can't create those pickers anymore.
Upgraded sites still have them. And possibly community packages as well.
I'll set this to "Fixed" even though it might not address ALL of the issues. It is a great improvement already and we can always create more issues to deal with the things missed here. :-)
Backwards Compatible: True
Fix Submitted: Pull request
Due in version: 7.12.0