Forum Discussion

LBiMenno's avatar
LBiMenno
Helper
12 years ago

Blogpost amount of views does not increase

I've created a new component that shows the content (title,teaser,author,body,etc) of an article. We did not use the default 'component' of lithium to show the article, because we wanted more possibilities on setting up our own html structure.

 

However, I noticed that by not using the default component to show a blogpost, the amount of views of the specific post does not increase.

 

Is there something I can do about this? Can i increase the amount of views with an API call?

2 Replies

  • Are you showing the article on the article page, or another page?

     

    I don't think there's a way of increasing the count via the REST API. API calls have their own metrics, and whilst metrics can be retrieved via the API, I don't think there's a way to set them via the API.

     

    It's a bit of a hack, but you could try including the in-built component on the blog article page, but hiding it from view.

  • LBiMenno's avatar
    LBiMenno
    Helper
    12 years ago

    I am showing the article on the article page, so that's OK.

     

    I could indeed show the built-in component of showing the article, but this is not a very nice solution :)

     

    Is there a built-in component that just increases the counter?