Custom Hooks for Segments and Videos
https://processwire.com/talk/topic/17068-markupsitemap/page/4/?tab=comments#comment-193810:
I'm wondering if there's some way to add support for URL segments in the module. Any chance you might've figured this out already?
🙂 Basically in my use case there are pages that list items below them, yet those items actually live outside of the publicly viewable page tree. It's a no-brainer that they wont work right out of the box, but what I'm wondering is if we could somehow – hook or some template setting or something – inform MarkupSitemap of these "non-pages", and add them to the sitemap.
I had a quick look at the codebase, and I'm wondering if this could be achieved by an optional hook in MarkupSitemap::addPages, perhaps by passing $page and $url to a hookable method after calling $this->urlSet->addUrl($url)? Seems that this way I could add a custom round of iteration and also add those URL segments as new URLs to the URL set
🙂
https://processwire.com/talk/topic/17068-markupsitemap/?do=findComment&comment=193819:
Another related feature that I've thought about often is a hook for adding custom resources. The main use case would probably be videos tied to specific pages. As there is no agreed-upon way of uploading videos in ProcessWire, the module can't know what is a video and what isn't. Hooks would be perfect here.