Copied to clipboard

Flag this post as spam?

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


  • Julius Goddard 41 posts 152 karma points
    Apr 12, 2024 @ 08:30
    Julius Goddard
    0

    How To Access Properties using The Content Picker

    I am rendering a component which uses content from a separate page on the website using the Content Picker.

    enter image description here

    The module "Slider" is a separate page of the type "StandardContentBlockPage" with tabs such as "Image", "Content" etc.

    enter image description here

    Currently, it appears that I do not have access to any of the tabs or properties on "Slider" - only its URL, using Slider.Modules.Url()

    What do I have to write out in the code to have access to these other properties?

    Thanks,

    Julius

  • Julius Goddard 41 posts 152 karma points
    Apr 12, 2024 @ 10:54
    Julius Goddard
    0

    I managed to work it out after quite a while.

    Create a variable ModuleItems = item.Modules for the modules and then access the properties using .Value - in this case

    var Image = ModuleItems.Value

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies