Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mus'ab 158 posts 387 karma points notactivated
    Jun 09, 2020 @ 08:11
    Mus'ab
    0

    How To Get Media References Umbraco 8.6

    Hi how can I use the new feature In Umbraco 8.6 (media references) programmatically and get a list of nodes using specific media? enter image description here

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jun 09, 2020 @ 09:29
    Dave Woestenborghs
    0

    Hi,

    These are stored as relations in Umbraco. You can use the RelationService to query them.

    For the alias of the relation type you can use : Umbraco.Core.Constants.Conventions.RelationTypes.RelatedMediaAlias

  • Mus'ab 158 posts 387 karma points notactivated
    Jun 09, 2020 @ 11:50
    Mus'ab
    0

    Hi Dave

    do you have a simple code example to get all nodes that have a specific image in their properties by image id?

  • 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.

Please Sign in or register to post replies