dwolke/zf-bootstrap 问题修复 & 功能扩展

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

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

dwolke/zf-bootstrap

Composer 安装命令:

composer require dwolke/zf-bootstrap

包简介

ZF2 ViewHelper für Bootstrap 3

README 文档

README

Simple Module with ViewHelpers for using with ZF2 Navigation with Bootstrap 3.

Actually created for personal use, but feel free to use this in your own projects.

Usage

Create your navigation in module.config.php:

'navigation' => array(
	'default' => array(
		array(
			'label' => 'Startseite',
			'route' => 'home',
		),
		//Dropdown-Menu
		array(
			'label' => 'Dropdown-Test',
			'uri' => '#',
			'dropdown' => true,
			'pages'       => array(
				array(
					'label'   => 'Bar',
					'route'   => 'bar',
					'controller'  => 'Application\Controller\Index',
					'action'      => 'bar',
				),
				// Menu divider
				array(
					'type' => 'uri',
					'divider' => true,
				),
				array(
					'label'   => 'Baz',
					'route'   => 'baz',
					'controller'  => 'Application\Controller\Index',
					'action'      => 'baz',
				),
			),
		),
	),
),

add the navigation to the service manager:

'service_manager' => array(
	
	// this adds the default Navigation
	'factories' => array(
		'my_navigation' => 'Zend\Navigation\Service\DefaultNavigationFactory',
	),

),

and use the viewhelpers in your view/layout scripts:

<?php
	// render only the 'ul'
	echo $this->navigation('my_navigation')->bsNavMenu()->setUlClass('nav navbar-nav');
	
	// or render the whole Navbar
	echo $this->navigation('my_navigation')->bsNavBar()->setOptions($navbarOptions);

?>

$navbaroptions is an Array with the following options:

  • inverse : true | false
  • fluid true | false (container-fluid | container)
  • position (string): fixed-top | fixed-bottom | static-top
  • ulClass (string): the css class for the first 'ul'
  • brandTitle (string)
  • brandLink (string)
  • brandImg (string): path to img
  • brandShowTitle : true | false

all options are optional ;-)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固