Copied to clipboard

Flag this post as spam?

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


  • Adriano Fabri 458 posts 1601 karma points
    Apr 12, 2017 @ 09:47
    Adriano Fabri
    0

    What happens when a page is in preview mode and in the backoffice?

    Hi, I am really interested to your package but I want to be sure that the counter is not incremented when a page is in preview mode and when I work with the node in backoffice.

    Can you tell me something about this?

    Thank you

    Adriano

    Umbraco v7.5.13
    SQL Server 2016
    
  • Cimplex 113 posts 576 karma points
    Apr 13, 2017 @ 06:52
    Cimplex
    100

    Sure, try this:

    @if (!(UmbracoContext.InPreviewMode || Request.QueryString["dtgePreview"] == "1"))
    {
        CounterService.Increment(Model.Content.Id);
    }
    

    // Herman

Please Sign in or register to post replies

Write your reply to:

Draft