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 all,
Need you help in creating a custom validation class for Umbraco properties.
The class will get a Node ID, check if it's valid and return a string to the image.
Something like:
public static string GetImageLink (int link) {
if (link != null && link > 0 ) {
var imageLink = umbraco.Media(link).umbracoFile; }
}
Questions:
1. Where should this class be created? it's a MVC project
2. What libraries should I add (and how) so commands like umbraco.Media / uQuery.GetNode / Node.GetProperty will work?
Thanks.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Right way to create a validation class
Hi all,
Need you help in creating a custom validation class for Umbraco properties.
The class will get a Node ID, check if it's valid and return a string to the image.
Something like:
public static string GetImageLink (int link) {
if (link != null && link > 0 ) {
var imageLink = umbraco.Media(link).umbracoFile; }
}
Questions:
1. Where should this class be created? it's a MVC project
2. What libraries should I add (and how) so commands like umbraco.Media / uQuery.GetNode / Node.GetProperty will work?
Thanks.
is working on a reply...