• Resolved frankiewebs

    (@frankiewebs)


    Greetings,

    I have several pods created: room, lot, product, etc.

    The ‘room’ pod has a field for current lot.

    The ‘lot’ pod has a field for current product.

    On the individual room (post) page, I have a pods template to show various data points, including the current lot. What I want to show also is the current product, which is attached to the lot pod as a field. Is there a way to dynamically populate a pods template with the current value of a field on the current page?

    I could also have current product as a field on the room pod, however I would like the product to be updated automatically when the lot is changed.

    Do you have any suggestions on the best way to accomplish this?

    Please let me know if you need any more information. Thanks very much for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @frankiewebs

    How are products linked to rooms exactly?
    Are these directly related to rooms or should they only be linked to a lot?
    I’m not sure I fully understand the structure. Not how to currently did it but how it should be.

    I could also have current product as a field on the room pod, however I would like the product to be updated automatically when the lot is changed.

    What do you mean with update? If a product is a separate post type then it also won’t update if you change a lot.

    Cheers, Jory

    Thread Starter frankiewebs

    (@frankiewebs)

    Products are currently only linked to lots. Lots are linked to rooms. I would like to have the current product show up on the room post, by displaying the current_product field from the current lot. That way, if I update the current lot of a roome, the current product will update as well.

    I hope this is more clear. Thank you!

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @frankiewebs

    You’ll need to use bi-directional relationships for this.
    That way you can traverse back to the products.

    So it would be something like this for a room object context: {@rel_lot.rel_product}.
    The room would have a relationship field back to lot and the lot back to product. If you link these relationship fields as bi-directional it will update the relations automatically.

    Cheers, Jory

    Plugin Author Jory Hogeveen

    (@keraweb)

    Closing topic due to inactivity.
    Feel free to reach out if you still need help!

    Cheers, Jory

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Help Displaying a Field’ is closed to new replies.