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've looked at the documentation and it reads as I'd expect. However whne I ima trying to use the related links datatype I am getting a null reference.
I can output
Model.Content.GetProperty("related").Value.Tostring()
and it outpusts the content as a string. But
Model.Content.GetPropertyValue<DynamicXml>("related")
is throwing the null exception.
Any ideas?
Hi Tony,
Are you using Umbraco v7 or v6?
Could you post the exception and also the string value?
Jeavon
Using 7
DELETED THE EXCEPTION ETC AS IT IS IRRELEVANT TO THE SOLUTION BELOW
Ah cool, take a look at this new documentation for related links in v7 as it has changed so the Razor sample is slightly different.
Aha! Cheers.
I'll need to stop using google to find documentation
np, actually maybe a note on the v6 editors linking to v7 version would also be useful :-)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Related links datatype - "Object reference not set to an instance of an object."
I've looked at the documentation and it reads as I'd expect. However whne I ima trying to use the related links datatype I am getting a null reference.
I can output
and it outpusts the content as a string. But
is throwing the null exception.
Any ideas?
Hi Tony,
Are you using Umbraco v7 or v6?
Could you post the exception and also the string value?
Jeavon
Using 7
Ah cool, take a look at this new documentation for related links in v7 as it has changed so the Razor sample is slightly different.
Aha! Cheers.
I'll need to stop using google to find documentation
np, actually maybe a note on the v6 editors linking to v7 version would also be useful :-)
is working on a reply...