Copied to clipboard

Flag this post as spam?

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


  • Ole Kristian Losvik 22 posts 73 karma points
    Oct 15, 2016 @ 09:58
    Ole Kristian Losvik
    0

    Save that user has read/opened page in Umbraco

    I am trying to make a very simple learning managemt system in Umbraco, and need to store which pages the front-end member has opened.

    Is there any suggestions on how to save that the user has opened the page?

    I guess if I want to use the existing content, I have to save it either on the page, or on the member? Or would it be better to make an own table for this?

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Oct 15, 2016 @ 10:15
    Lee Kelleher
    100

    Hi Ole,

    You could use the RelationService for this. Relating the page's node ID with the member's ID.

    There's an old blog post about using relationships, but it was written for Umbraco v4, so the APIs are out of date, but the concepts are similar.

    https://umbraco.com/follow-us/blog-archive/2012/12/7/getting-to-know-umbraco-relations/

    Cheers,
    - Lee

  • Ole Kristian Losvik 22 posts 73 karma points
    Oct 15, 2016 @ 10:18
    Ole Kristian Losvik
    0

    Hi Lee,

    Wow! That's perfect:)

    Thanks!

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Oct 15, 2016 @ 10:22
    Lee Kelleher
    0

    Hi Ole,

    Relations is one of the lesser know features of Umbraco that can be powerful to use.

    Just in case you hadn't seen, there's a "Relation Types" tree in the Developer section, where you can create new types and view the relation data.

    All the best!

    Cheers,
    - Lee

Please Sign in or register to post replies

Write your reply to:

Draft