定制 deptinternalaffairsnz/silverstripe-navigation-scraper 二次开发

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

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

deptinternalaffairsnz/silverstripe-navigation-scraper

Composer 安装命令:

composer require deptinternalaffairsnz/silverstripe-navigation-scraper

包简介

README 文档

README

A module for SilverStripe that allows you to scrape navigation from another site and use it as navigation on your own site.

Installation

Install with composer:

composer require 'deptinternalaffairsnz/silverstripe-navigation-scraper' '1.0.1'

Usage

Configuration

In your own config file (e.g. mysite/_config/config.yml) define the menu sets, URLs to scrape, and CSS selectors to target.

NavigationScraper:
  MenuSets:
	ScrapedFooter:
	  PageToScrape: 'https://www.example.com'
	  CSSSelector: '.footer-nav li a'
	ScrapedMainNav:
	  PageToScrape: 'https://www.example.com'
	  CSSSelector: '.header-nav li a'

Trigger a scrape

There are two options to trigger a scrape.

  1. Run the build task dev/tasks/TriggerScrapeBuildTask
  2. Install the cron task module - assuming you've configured a cron job appropriately a scrape will be run daily at 1am by default.

Templates

Use the $ScrapedMenu function in your templates, like so:

<ul>
	<% loop $ScrapedMenu("ScrapedFooter") %>
		<li><a href="$Link">$Title</a></li>
	<% end_loop %>
</ul>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-12-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固