Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
In the Name Template we can add the propertyAlias to show a different naming then Item 1.
But what if this is a Multinode Treepicker or any other picker which holds an id of the selected item.
Now it shows the id but I would like to show the name of the selected item. Can we do this?
/Michaël
Hi Michaël,
To customise the name template, you can use Angular filters, so you'd have...
{{ pickerAlias | filterName }}
For the node names, Matt put together an example for a single content picker...
https://gist.github.com/mattbrailsford/d7f512ca4a6f24ebe70ebed82eb163f5
So you can use...
{{ pickerAlias | ncNodeName }}
(This will be bundled in the next release of NestedContent - release date unknown)
But that is for single content pickers. For multiple pickers, you'd need to modify the filter to loop over the node IDs and names.
I hope this helps?
Cheers, - Lee
Hi Lee,
so I need to create a new plugin with a package manifest that contains only the js file of the angular filter?
Yeah, or any way to inject the JS into the back-office. New package.manifest is the easiest way.
Matt wrote a 24days post about that too: http://24days.in/umbraco/2015/umbraco-7-back-office-tweaks/
Thanks Lee!
Will try this out!
This filter works nicely for MNTP with a single item for Stacked Content too, thanks Lee & Matt!
What if I have a multinode treepicker? In my image below, I would like the name Test to appear instead of Item 2
Guys, what's wrong if input in filter is undefined?
return function (input) {...
In this part of js code
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Name Template show name instead of id
Hi,
In the Name Template we can add the propertyAlias to show a different naming then Item 1.
But what if this is a Multinode Treepicker or any other picker which holds an id of the selected item.
Now it shows the id but I would like to show the name of the selected item. Can we do this?
/Michaël
Hi Michaël,
To customise the name template, you can use Angular filters, so you'd have...
For the node names, Matt put together an example for a single content picker...
https://gist.github.com/mattbrailsford/d7f512ca4a6f24ebe70ebed82eb163f5
So you can use...
(This will be bundled in the next release of NestedContent - release date unknown)
But that is for single content pickers. For multiple pickers, you'd need to modify the filter to loop over the node IDs and names.
I hope this helps?
Cheers,
- Lee
Hi Lee,
so I need to create a new plugin with a package manifest that contains only the js file of the angular filter?
/Michaël
Yeah, or any way to inject the JS into the back-office. New package.manifest is the easiest way.
Matt wrote a 24days post about that too: http://24days.in/umbraco/2015/umbraco-7-back-office-tweaks/
Thanks Lee!
Will try this out!
/Michaël
This filter works nicely for MNTP with a single item for Stacked Content too, thanks Lee & Matt!
What if I have a multinode treepicker? In my image below, I would like the name Test to appear instead of Item 2
Guys, what's wrong if input in filter is undefined?
return function (input) {...
In this part of js code
is working on a reply...