Copied to clipboard

Flag this post as spam?

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


  • Mathias Valentin 60 posts 208 karma points
    Nov 22, 2016 @ 09:17
    Mathias Valentin
    0

    Best way to list and filter members (razor)

    Hi all,

    I have about 100 members (employees) in the members section and I would like to display them in a large list, but they should only appear in the list if they have a specific tag on them (a tags property).

    My question is - what is the best way to run through all the members of a specific type and filtering out the ones which has the selected tag (with only Razor).

    Thanks!!!

  • Søren Kottal 712 posts 4570 karma points MVP 6x c-trib
    Dec 21, 2016 @ 21:29
    Søren Kottal
    0

    Hi Mathias

    I would use Examine, and search the InternalMemberIndex for members containing the specific tag.

    Theres a great (it's actually the worlds friendliest :)) blog post about searching in Examine here -> http://24days.in/umbraco-cms/2013/getting-started-with-examine/

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Dec 26, 2016 @ 14:40
    Alex Skrypnyk
    0

    Hi Mathias and Søren

    InternalMemberIndex - definitely is the fastest way to work with members.

    But it's suitable only for displaying data.

    If you need some table with CRUD operations you have to use MemberService, read more here - https://our.umbraco.org/documentation/reference/management/services/memberservice

    It works directly with database and provide the actual data for you, but be aware this is really not so fast as Examine.

    Thanks,

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft