Skip to content

Plugin for register visits on RainLab blog posts and retrieve a list for most visited posts

Notifications You must be signed in to change notification settings

sanPuerquitoProgramador/most-visited-posts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Most Visited Post for RainLab Blog

Plugin to register visits to RainLab Blog Blog Publications and create a list of the most visited posts in a period of time

##Installing the watcher IMPORTANT

In order to register the visit to a Publication RegisterVisit component must be added to Post Page

##Create a most visited posts list Add the TopVisitedComponent

This component has parameters

Most Visited From - The time period to get the most visited publications

  • Today
  • Current Week
  • Last Week
  • All the time

Category filter

You can select a category filter, this way you can get the Top 10 from a particular category. If no category is selected, the component will retrieve the top 10 from all your publications

Top

How many publications must be retrieved

###Examples

Using these three parameters you can construct different lists. Eg.

  • Last week, top 10 from local news
  • Today top 5 from all the site
  • Top 10 from all the site in all the time

###Displaying the results The TopVisitedComponent inject the mostVisitedPosts object

Use as you already use the RainLab blog post

{% for post in mostVisitedPosts %}
<div class="post">
	<div class="postImage"><img alt="" src="{{post.featured_images[0].path}}"></div>
		<div class="post-content">
			<h3>{{post.title}}</h3>
			<a href="{{post.url}}">Continue reading</a>
		</div>
	</div>
{% endfor %}

##Support and bugs reporting You can write in the forum or visit me in Github

About

Plugin for register visits on RainLab blog posts and retrieve a list for most visited posts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published