Download the PHP package technikh/sculpin-path-navigation-bundle without Composer
On this page you can find all versions of the php package technikh/sculpin-path-navigation-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download technikh/sculpin-path-navigation-bundle
More information about technikh/sculpin-path-navigation-bundle
Files in technikh/sculpin-path-navigation-bundle
Package sculpin-path-navigation-bundle
Short Description Generate path navigation block (with pages) in Sculpin
License MIT
Homepage https://github.com/TechNikh/SculpinPathNavigationBundle
Informations about the package sculpin-path-navigation-bundle
SculpinPathNavigationBundle
Generate date navigation block (with pages) in Sculpin :
- It generates pages listing posts for each year and couple year/month
- And a block to navigate between this pages
You can see a working demo on the right column of my personal french blog.
Installation
Using composer, add the dependancy to your composer.json :
And run the composer update command
Enable the bundle. If you have already have an app/SculpinKernel.php, add this bundle to it otherwise create the file with the following content :
Then you need to add the date page html and the date navigation block html to your project :
- Copy the Resources/html/include/path_navigation.html file in the _includes folder of your source
- Copy the Resources/html/page/date.html file in the blog folder of your source (or any other html folder you use). For information, a path_paginated.html template is available for paginated date page.
Usage
In a template, you can now call the following twig function :
It will generate the date navigation html.
You can specify a custom template :
Configuration
- tn_path_navigation.permalink_year : the url mask for the date year page
- tn_path_navigation.permalink_month : the url mask for the date month page
License
MIT