Copied to clipboard

Flag this post as spam?

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


  • Damian 3 posts 73 karma points
    Dec 29, 2020 @ 10:03
    Damian
    0

    contentment get parent node created content

    Hello, I have a question about Contentment. How can I get the parent node of the created / edited content?

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Dec 29, 2020 @ 10:24
    Lee Kelleher
    0

    Hi Damian,

    Would you be able to provide some more context of what you are wanting to do?

    e.g. Which editor are you using? Which Contentment version? etc

    Thanks,
    - Lee

  • Damian 3 posts 73 karma points
    Dec 30, 2020 @ 07:48
    Damian
    0

    Thanks for the reply already clarifies. I am using Data List with my own data source version 1.2. The Data List is supplied with an external data source that has a tree structure (serial> Season> Episode). When I want to retrieve a season using the API, I need the serial value.

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Dec 30, 2020 @ 12:39
    Lee Kelleher
    0

    Hi Damian,

    Okay, so you have a custom data source, which is returning a list of items with the Season values, and you would like to access the reference in the original data source (API)? (so you can access the parent Serial object?)

    My suggestion would be to construct the Data List item's value as a breadcrumb trail, either comma separated, (much like Umbraco does with the path of node IDs), e.g. "111,222", or serialized, e.g. { serial: "111", season: "222" } ... then you can access (deserialize) on the frontend (Razor) template, and query the original data source API however you need to with the appropriate parent Serial value.

    Hope this helps?

    Cheers,
    - Lee

Please Sign in or register to post replies

Write your reply to:

Draft