SilverStripe\CMS\Model\SiteTree::get_by_link
Fetches the {@link SiteTree} object that maps to a link.
If you have enabled on this site, then you can use a nested link such as "about-us/staff/", and this function will traverse down the URL chain and grab the appropriate link. Note that if no model can be found, this method will fall over to a extended alternateGetByLink method provided by a extension attached to
Signature
public function get_by_link(string
$link,
[boolean
$cache = true] )
Parameters
$link
— string- The link of the page to search for
$cache
— boolean- True (default) to use caching, false to force a fresh search from the database
Returns
- SiteTree|null