Knowledge for the World

In ModX, use longtitle if exists, else use pagetitle

This guide demonstrates how to use ModX conditional statements and template tags to check for and display a resource's Long Title. If it exists, the Long Title is printed; if it does not exist, the regular page title is printed.


Use the following conditional statement


The code above can be roughly interpreted as: IF longtitle !EMPTY, PRINT; ELSE, PRINT pagetitle