FirstChildRedirect

Redirects a page to its first published child resource.

Creator: Jason Coward (opengeek)
Updated by: Mark Hamstra (markh)

Need help installing this extra?

About FirstChildRedirect

Use FirstChildRedirect to redirect users to the first document in a folder (based on menuindex sort order, however configurable) when they access a folder document within MODX.If no children are found for the specified document, FirstChildRedirect will redirect users to the site start page, though this behavior can easily be modified by passing &default to the snippet with either a page ID, or one of the following: site_start,site_unavailable_page,error_page,unauthorized_page.

You can also use the &sortBy (any resource field) or &sortDir (asc or desc) parameters to specify what to sort on. Please note that it always takes the first resource.

Documented at http://rtfm.modx.com/display/ADDON/FirstChildRedirect, and source kept on Github at https://github.com/Mark-H/FirstChildRedirect

Information

Released
February 7, 2020

Supported Database
MySQL, SQL Server

License
GPLv2

Supported Versions
2.5 - Current

Downloads
27,411

Documentation
FirstChildRedirect Documentation

Instructions

Install via Package Management.

New in 2.4.0-pl

  • Simplify internal logic for response code shortcuts
  • Code style reformat, now requiring at least PHP 5.4 (but really, use 7.1+)
  • Confirmed compatibility with MODX3 alpha2+

Current releases

2.4.0-pl
View | Download
February 7, 2020
2.5 - Current

2.3.1-pl
View | Download
December 29, 2011
2.0 - Current