Copied to clipboard

Flag this post as spam?

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


  • Jules 272 posts 563 karma points
    Oct 11, 2015 @ 21:20
    Jules
    0

    Related Content Pickers

    Hi all

    Using U7.3

    I have a requirement for a number of related categories in a website. The following is a simplified example of the Content tree.

    Shops
        Shop1
        Shop2
        etc...
    Products
       Product1
       Product2
       etc...
    

    There is a Shop doctype and a Product doctype.

    Shop has a property called productList and Product has a property called shopList. Both shopList and productList would be multi pickers of some sort.

    Does anybody know if it is possible to set things up so that if in the Shop1 content node, I select Product1 in the productList, when I view the Product1 node, I would see that Shop1 had been added to the shopList property automatically.

    Also if I delete Shop1 from shopList on the Product1 node, then Product1 is removed from productList on the Shop1 node.

    J

  • Charles Afford 1163 posts 1709 karma points
    Oct 12, 2015 @ 10:37
    Charles Afford
    0

    https://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/event-examples

    Not sure how old the page is but it will give you an idea. You Need to drop in to the save event of your node, through the API, get your other node. Set the property and then save and publish :). Charlie.

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Oct 12, 2015 @ 10:48
    Hendy Racher
    0

    Hi Jules,

    You could look at using multipickers from nuPickers and configuring them to use the "Relations Only" save format (so for example, any change to a productList on a shop will be instantly reflected in the shopList list for any changed products)

    HTH, Hendy

  • Charles Afford 1163 posts 1709 karma points
    Oct 12, 2015 @ 10:53
    Charles Afford
    1

    Thanks Hendy, I will take a look at that as well :)

  • Jules 272 posts 563 karma points
    Oct 13, 2015 @ 14:54
    Jules
    0

    Thanks for the tip Hendy. Will have a look.

    Jules

Please Sign in or register to post replies

Write your reply to:

Draft