Link Strategy

Manage internal and external links on your site.

Creator: Mat Dave Jones (matdave)

Need help installing this extra?

Screenshots

About Link Strategy

This is a simple link strategy extra for MODX Revolution 3.x. It allows you to review the links used on your website, and find orphaned pages, link text variations, and external links.

Information

Released
June 9, 2023

Supported Database
MySQL

License
GPLv2

Supported Versions
2.6 - Current

Downloads
75

Documentation
Link Strategy Documentation

Instructions

Install via package management. To generate the initial link stats, go to the Link Strategy manager page and click on the "Regenerate Links" button. This will take a while, depending on the size of your site. If this fails, you may need to manually run the included indexing script via CLI or cron.

Manual Link Indexing

If the automatic indexing fails, you can run the included indexing script manually. This is useful if you have a large site, or if you want to run the indexing script via cron.

To run the indexing script, you need to SSH into your server and run the following command:

php /path/to/your/modx/core/components/linkstrategy/cron/generate.2x.php

Or for MODX 3.x Versions:

php /path/to/your/modx/core/components/linkstrategy/cron/generate.3x.php

Once completed, this will output the number of resources indexed. You can then go to the Link Strategy manager page and verify it is showing the newly discovered links.

Automatic Indexing

In general, the automatic indexing should work fine. It renders a page on save, and scans it for links. However, the links can change if you make adjustments to a template or chunk in your site that would affect the frontend links. If this happens, you can run the indexing script manually to update the links, or go to the manager page and click "Regenerate Links".

Disable Automatic Indexing

Due to the way automatic indexing works, it may slow down the save event on your site depending on how your site is set up. If you want to disable automatic indexing, you can do so by setting the linkstrategy.allow_regenerate_onsave system setting to No. It is recommended you then run the indexing script manually via cron.

Disable "Regenerate Links" Button

In the event you have a large site that consistently fails to generate links with the provided button. You can disable it in system settings. This will prevent the button from showing up in the manager page. It is recommended you then run the indexing script manually via cron.

To disable the button, set the system setting linkstrategy.allow_regenerate_button to No.

New in 1.1.4-pl

  • Fix issues with wrong processor path on MODX 3

Current releases

1.1.4-pl
View | Download
June 9, 2023
2.6 - Current