Mit der TYPO3-Version 4.5 gibt es unter anderem eine neue Systemextension mit dem Namen „linkvalidator“. Mit dieser ist es möglich Links auf der Seite zu überprüfen. Dieser Beitrag ist von Patrick Gaumond, vielen Dank dafür.
One feature I have always receive requests about when presenting TYPO3 was the lack of link validation built into TYPO3 so editors don’t need to use external tools. Until now the solutions found on TER where okay but lacked an important feature for bigger sites: Cron/Scheduler support. Since having a site with thousand of pages could slow it down if an editor does an „on-demand -check“, we had to propose something more robust. Say hello to the new system extension Linkvalidator.
The new sysext is partly based on cag_linkchecker that’s been available for quite some time on TER. The developers at Infoglobe added some nifty features to it and revised the code to bring Scheduler support and email alerts.
The module itself is a sub-module of the „Info module“ and can be adjusted with PageTSconfig so you can remove the „on-demand“ function if you don’t want your editors to check the whole pagetree in the middle of the day. Removing this button would enforce the use of the Scheduler.
Since Linkvalidator supports the Scheduler we also added the capacity to send emails in case of broken links found. Using Linkvalidator with the Scheduler is quite easy if the Scheduler is already in a working state. You just add a new task and select Linkvalidator as the class. You will then be able to set the starting page (UID), depth and provide some TSconfig if needed for this actual task. There’s also a checkbox to decide if you want to receive emails on new broken links only and finally you can use your own template file to send emails.
With such features, your TYPO3 installation becomes more pro-active and instead of the old way of just not rendering a broken link, TYPO3 will send email to your editors and let them correct broken links before internet users even click on them. With a huge pagetree, you can set a different task for different editors, each having his own starting point so the HR editors receive emails only for broken links in its own web mount. Very nice for bigger sites.
You can also check links in extensions, not just tt_content! Just set „searchFields“ for your table. The example below adds tt_news link validation:
mod.linkvalidator { searchFields { pages = media,url tt_content = bodytext, header_link,records tt_news = bodytext, links } } |
Nice isn’t ?
So far the development have happen at http://forge.typo3.org/projects/extension-linkvalidator/ until the extension becomes part of the Core.
We invite anyone interested in Linkvalidator’s future to send patches and comment to our Forge section.
Let’s get rid of those broken links!
Patrick Gaumond
Infoglobe