Copied to clipboard

Flag this post as spam?

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

  • Andy Felton 180 posts 479 karma points c-trib
    Feb 05, 2020 @ 15:41
    Andy Felton

    Getting Model for containing page


    I'm wondering if anybody is able to help with the easiest way to access the Model of the page which holds the grid within the view (or Grid Value Converter) for the Editor?

    Thanks Andy

  • Anders Bjerner 467 posts 2781 karma points MVP 6x admin c-trib
    Feb 05, 2020 @ 18:35
    Anders Bjerner

    Hi Andy,

    There is currently no way this package lets you get the IPublishedContent holding the grid value. So currently the best option is:


    When using this line of code, you will however make the assumption that the requested page is also the one holding the grid value - which may not always be the case.

    I'd like to make this easier in a future release, and have already made some of the work:

    This means that you'll be able to acces the parent IPublishedElement of the page or element holding the grid value. I don't really have a plan for when this will be released, but hopefully soon ;)

  • Andy Felton 180 posts 479 karma points c-trib
    Feb 13, 2020 @ 17:44
    Andy Felton

    Hi Anders,

    Thanks for the code works OK for what I'm doing.

    The change you're looking at making would be really useful.

    Thanks Andy

Please Sign in or register to post replies

Write your reply to: