Code Of Conduct - Privacy Policy
Our.umbraco.com is the community mothership for
Umbraco, the open source asp.net cms. With a friendly forum for all your questions, a comprehensive documentation and a ton of packages from the community. This site is running Umbraco.
Name template access to (Content) Picker properties
I have a Content Picker in a document type that I use as a Nested Content data type. The Content Picker has the alias
page
.Is it possible to use a property alias of the picked content as name template? I tried
{{page.Name}}
and{{page.Url}}
but neither worked.Hi Sandro,
You can use your own custom Angular filters in the name template like this.
The last release has one built in for node names :
You can use this as name template
Where you need to replace picker alias with the alias of the property containing the picker
Dave
Thank you very much
I wasn't able to make it works with the new 7.6 UDI based pickers. Which of Umbraco are you using?
EDIT: it works fine with 7.6 content picker, but not with media picker!
/M
If anyone else finds this and is using V8 and a property in Members you need to use:
Note: There seems to be a bug if you refresh the page it stays as Loading... if you go to another page and back it shows correctly again.
Hi Marco,
This on versions pre 7.6
This implemented using a angular filter. So this means that you can roll out your own.
Have a look at the source code for the one that ships with Nested content : https://github.com/umco/umbraco-nested-content/blob/develop/src/Our.Umbraco.NestedContent/Web/UI/App_Plugins/NestedContent/Js/nestedcontent.filters.js
That would be a good starting point. And if you manage to create your own than a PR to Nested Content would be nice.
Dave
With Document it works fine also on 7.6. I had a naive try to extend the filter to Media, but with no luck up to now :-D (my Angular skills are completely absent...)
Hi Marco,
Looking at the source code, I don't think it works with media in previous versions of Umbraco either.
Maybe you can try the following :
Create a folder in the App_Plugins folder. Name doesn't matter.
In that fodler create a js file (name doesn't matter) and paste in the following content
Then add a file called package.manifest in the same folder.
In that file add the following contents
Of course you need to change it to use the correct folder and file name.
After that you can use the {{ncMediaName}} filter
I believe this should work....but have not tested it.
Dave
In the mean time I have modified nestedcontent.filters.js (I know...) and it works. I just added this code to the end of the file:
Cross linking to GitHub issue about whether to include an "ncMediaName" filter with NC.
https://github.com/umco/umbraco-nested-content/issues/128
Having the same problem and struggling to resolve using a helper.
var alertsList = new List
Looping through the pages then the nested content (pagesToDisplay) but a null exception keeps getting thrown: Please help
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.