0

I am currently working on a project on SharePoint 2010.
I am not a professional or so but during the last 3 months, I have been learning a bit on SharePoint and its features.

For this project, I need to create a section on a page, which contains links. The links which when clicked leads to their respective articles.

However, the tricky part of this is next to each link, there should be the number of views for that particular link.

Also, the links should be sorted with the most number of views first.

For Example;

  1. Link 1 (100 views)

  2. Link 2 (78 views)

  3. Link 3 (55 views)

  4. Link 4 (53 views)

Is it possible to achieve this in SharePoint? Thank you in advance for your help guys.

0

You would probably have to write some javascript. My solution would be this:

  • Make sure you have jQuery available
  • Create a list to track the events
  • Add an event handler to the onclick event of the link
  • In that event handler write the code to add an item to the event list
  • When loading the page query the event list and add the total amount of clicks to the view
  • To make working with the event list easier, SPService might be useful. (https://spservices.codeplex.com/)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.