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
I'm sure this is a simple question but was not able to find anything on initial searching. How can I access the data values from a partial view?
When Umbraco native data types I could do something like:
// Get data type id
var dataTypeId = 1234;
var preValues = PreValues.GetPreValues(dataTypeId).Values;
var enumerator = preValues.GetEnumerator();
// Get List Item Value
var category = ((umbraco.cms.businesslogic.datatype.PreValue)enumerator.Current).Value;
// Output item name
Many thanks in advance!
Do you want to get data of some Umbraco node?
Datatypes don't store values of data, this is only type of possible data in Umbraco node
How to get data from nodes read here - https://our.umbraco.org/documentation/reference/templating/mvc/querying
There's a strongly typed Picker object that returns the picked items, but unfortunately it doesn't have a property to return the source collection (issue on github)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted