Blog Sections Open

Using Evolution CMS as a Data Service for a Single-Page Application

If an AJAX-heavy catalog starts turning into a maintenance nightmare, moving the front-end state into an SPA and treating Evolution as the data provider can be the cleaner architecture.

This donor made a strong architectural point: many “AJAX catalogs” in legacy CMS projects are really single-page applications built the hard way. Instead of repeatedly requesting full pages and slicing out fragments with jQuery, the project can let Evolution CMS act as the content service while the front end manages state properly.

The proposed pattern

  • prepare a snippet that returns JSON
  • create a document with application/json output
  • let the front end load and paginate data client-side

Example API-style snippet

$param = array(
  'offset' => (int)$_GET['offset'],
  'display' => '40',
  'parents' => (int)$_GET['parent'],
  'tvList' => 'img',
  'api' => 'pagetitle,tv.img,introtext'
);
return $modx->runSnippet('DocLister', $param);

Why this still matters

This is an early ecosystem argument for treating the CMS as a content backend rather than forcing every interactive pattern through page-fragment hacks.

Source: original community announcement.

Newer post

Could XML-RPC Turn Evolution CMS into a Remote Publishing Backend?

This donor captured an interesting ecosystem idea: using XML-RPC to edit and publish Evolution content from external tools such as Sublime Text or mobile clients.

Older post

Removing the FRAMESET from the Evolution CMS Manager

This manager prototype explored a much cleaner admin shell: no frameset, better full-screen overlays, and a more modern path for future interface work.