fadriqueclickennet/blog-module

A blog module for ClickennetCMS.

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:clickennet-module

dev-master 2020-03-25 10:12 UTC

This package is auto-updated.

Last update: 2024-04-25 19:12:00 UTC


README

Usage

  • You have to create a blog.index and blog.show page in your front end theme.
  • You can link to the blog index page using : route(locale() . '.blog')
  • In the blog index you'll have access to a $posts variable on which you can loop
  • To create a link to a specific post: route(locale() . '.blog.slug', [$post->slug])
  • On the blog index and blog show pages you'll have access to a $latestPosts variable containing the latest posts, this amount can be configured in the admin.
  • On a post detail page, you can have access to the next and previous post by calling:
    • $post->present()->previous
    • $post->present()->next