Blog Sections Open

Getting a Resource Title and TV Value by Document ID

A practical cross-resource lookup pattern for Evolution CMS templates and snippets.

Templates often need more than the current page context. Sometimes a page stores the ID of another resource and needs to display that resource’s title, TV value, or another field on demand.

The important decision is whether the lookup should stay in a small helper snippet or move into a more reusable data-loading layer. For occasional template lookups, a focused helper is usually enough.

Typical need

  • Use one stored document ID.
  • Read that resource’s title.
  • Read one or more TVs from the same resource.

This is a common Evolution CMS pattern for related resources, cross-page settings, or secondary references. The key is to keep the lookup explicit and not hide too much cross-resource logic inside deeply nested template expressions.

Newer post

Uploading Multiple Files with eForm in Evolution CMS

How to handle several uploaded files in one Evolution CMS eForm submission without breaking validation or PHP upload processing.

Older post

Why MODX API Mode Can Still Leave You with an Empty Config Array

How to troubleshoot API bootstrap scripts when MODX_API_MODE is enabled but the expected Evolution CMS config values still do not appear.