jbouzekri/sculpin-date-navigation-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jbouzekri/sculpin-date-navigation-bundle

Composer 安装命令:

composer require jbouzekri/sculpin-date-navigation-bundle

包简介

Generate date navigation block (with pages) in Sculpin

README 文档

README

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 :

require: {
    "jbouzekri/sculpin-date-navigation-bundle": "1.*"
}

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 :

<?php

class SculpinKernel extends \Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel
{
    protected function getAdditionalSculpinBundles()
    {
        return array(
            'Jb\Bundle\DateNavigationBundle\JbDateNavigationBundle'
        );
    }
}

Then you need to add the date page html and the date navigation block html to your project :

  • Copy the Resources/html/include/date_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 date_paginated.html template is available for paginated date page.

Usage

In a template, you can now call the following twig function :

{{ date_navigation(page) }}

It will generate the date navigation html.

You can specify a custom template :

{{ tag_cloud(page, 'my_template.html') }}

Configuration

jb_date_navigation:
    permalink_year: /:year/index.html
    permalink_month: /:year/:month/index.html
  • jb_date_navigation.permalink_year : the url mask for the date year page
  • jb_date_navigation.permalink_month : the url mask for the date month page

License

MIT

统计信息

  • 总下载量: 35
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-07-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固