I'm using nested content to create a component with an image and would like to know if it's possible to display the image name as the template label for that Doc Type.
If I use {{image}} I get the Umbraco media reference url. ie. umb://media/197d7b7f087c44d8aac778f6e1900c0b but is there an easy way to supply the image name?
You're the one! I can't believe I was reading it wrong! I thought that | pipe was an an optional OR statement OMG so I only used one or the other! Wow!
No worries man. I had the same head scratching madness. There’s some really powerful values that can be used in these fields but it’s hard to find well documented info.
Nested Content Image Name as Template Label
Hi there,
I'm using nested content to create a component with an image and would like to know if it's possible to display the image name as the template label for that Doc Type.
If I use
{{image}}
I get the Umbraco media reference url. ie. umb://media/197d7b7f087c44d8aac778f6e1900c0b but is there an easy way to supply the image name?Thanks, Luke
Hi Luke
I know if it's a content picker you can use
{{pickerAlias | ncNodeName}}
to show the name of the picked item
... and in the original Nested Content there was a PR to add ncMediaName
https://github.com/umco/umbraco-nested-content/pull/129
{{pickerAlias | ncMediaName}}
but I don't think this ever got added, so suspect it's not an option in the version of Nested Content that is in the Umbraco core :-(
regards
Marc
Recently a PR has been merged in with some extra capabilities for the name template of nested content. This is part of 7.12
https://github.com/umbraco/Umbraco-CMS/pull/2457
These changes have been documented : https://our.umbraco.com/documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Nested-Content
Dave
Hello,
Does anyone know if this works in V8? I've tried every alias and none of them display the image name, picked with the media picker.
I checked the v8 documentation wich says I could be able to get the image name using the picker alias, but it only gives me:
umb://media/197d7b7f087c44d8aac778f6e1900c0b
I'm using the image picker in a nested content with no text string to draw a title from. So I have to use either item1, item2 etc. or the umb://media
I'm using v8.5 but also had this issue with 8.4 as well.
Many thanks! Daniel
Hi Daniel. Try this, it works for me currently in 8.4.
{{ tileImage | ncNodeName }}
Where ‘tileImage’ is the alias of your image property
Luke!
You're the one! I can't believe I was reading it wrong! I thought that | pipe was an an optional OR statement OMG so I only used one or the other! Wow!
...feeling a bit stupid at the moment!
Thank you so much!
{{ portfolioImage | ncNodeName }}
Best, Daniel
Hi Daniel,
No worries man. I had the same head scratching madness. There’s some really powerful values that can be used in these fields but it’s hard to find well documented info.
Glad I could help 😊
All the best, Luke!
I hope I can return the help one day.
😊
is working on a reply...