dev-master
9999999-dev
The Requires
1.0.1
1.0.1.0
The Requires
1.0.0
1.0.0.0
The Requires
A module for SilverStripe that allows you to scrape navigation from another site and use it as navigation on your own site., (*1)
Install with composer:, (*2)
composer require 'deptinternalaffairsnz/silverstripe-navigation-scraper' '1.0.1'
In your own config file (e.g. mysite/_config/config.yml
) define the menu sets, URLs to scrape, and CSS selectors to target., (*3)
NavigationScraper: MenuSets: ScrapedFooter: PageToScrape: 'https://www.example.com' CSSSelector: '.footer-nav li a' ScrapedMainNav: PageToScrape: 'https://www.example.com' CSSSelector: '.header-nav li a'
There are two options to trigger a scrape., (*4)
dev/tasks/TriggerScrapeBuildTask
Use the $ScrapedMenu function in your templates, like so:, (*5)
<ul> <% loop $ScrapedMenu("ScrapedFooter") %> <li><a href="$Link">$Title</a></li> <% end_loop %> </ul>