Copied to clipboard

Flag this post as spam?

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


  • Gary 7 posts 71 karma points
    Nov 18, 2015 @ 05:32
    Gary
    0

    TypedContent in preview

    Hi,

    We are using umbraco 7.2 and now we just found we have an issue in our umbraco backoffice preview.

    To be short, we have two document type (D1 and D2) for example. In D1, we used MNTP to link to D2, which means D1 can pick up multiple D2 as one of its properties. In the template for D1, we used TypedContent to get D2 and render it accordingly.

    Everything works fine. However, when we make some changes in D2 and save it without publish and then click preview button from D1, it shows the original D2 before change. If we save and published, it works fine. So here is the question, is it true that TypedContent can only pick up the published content?

    As I checked a little in the source code, TypedContent will eventually call the function to return GetById(UmbracoContext.InPreviewMode, contentId); in ContextualPublishedCache.cs. Therefore, I assume that TypedContent has the ability to pick up content for preview. I also confirm that the UmbracoContext.InPreviewMode is true before TypedContent is called.

    If you have any idea, please let me know. Or if you know TypedContent is not going to work in the situation, can you also please share your idea about what to do.

    Thanks a lot in advance.

    Cheers,

    Gary

Please Sign in or register to post replies

Write your reply to:

Draft