定制 symbiote-library/silverstripe-pagejax 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

symbiote-library/silverstripe-pagejax

Composer 安装命令:

composer require symbiote-library/silverstripe-pagejax

包简介

Adds partial page loading using ajax

README 文档

README

IMPORTANT

This module is no longer actively maintained, however, if you're interested in adopting it, please let us know!

Pagejax module for SilverStripe

Adds partial page loading using ajax.

Installation

Follow the standard SilverStripe module installation procedure

Requirements

You must have jquery included in your page

Usage

Cuurently we need to modify Page_Controller and add the following method

	public function getViewer($action) {
        $viewer = parent::getViewer($action);
		$this->extend('updateViewer', $action, $viewer);
        return $viewer;
    }

Modify your main Page.ss template and change

	$Layout

to

	<div class="pagejax-container">$Layout</div>

Then, any link you want to loaded internally needs to have the pagejax class applied, ie

	<a href="some/internal/page" class="pagejax">Internal page</a>

To customise the way the page transitions in and out, you can bind to the window.pagejaxStart and window.pagejaxComplete events, eg

	$(window).bind('pagejaxStart', function () { });

To change the page title on each refresh, specify an ajaxTitle() method on your Page_Controller class; otherwise, the page title will not be chanaged.

The module does take into account CSS and JS added using Requirements:: by parsing out relevant headers

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 5
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-06-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固