I’m pretty excited about all the new stuff I’ve discovered that MODx can do... my goal is to tie into some custom database tables and use MODx to display the information. Using a plugin that executes when a page is not found, I am able to grab a particular url segment and use it to look up an id in my custom database table (see this url:
http://modxcms.com/forums/index.php/topic,31477.msg193330.html)
Now that I can get that information from the custom database table, I figure I have at least 2 options, and I’m hoping someone wiser than myself can weigh in on them:
1. Format the information (i.e. the row from the custom database table) and pipe that into an existing document’s [*content*] tag.
2. Generate my own custom templates using sensible tags appropriate for the custom table whose output they would be formatting... e.g. if the table deals with books, I might have template variable tags for [*author*], [*isbn*], [*publisher*], [*synopsis*], etc.
Option #1 is simple, but it would not offer the degree of formatting control that the web designers like (read: it may not meet the needs of the project). I’m not exactly sure how to do EITHER option though... how do I trigger MODx’s parsing engine? And assuming I wanted to do the 2nd option, how would I prime the parser to find/replace my custom variables?
Just in case someone is wondering why I don’t use custom Template Variables, it’s basically because we require a strictly normalized database structure for these custom tables... reporting on the MODx pages that make heavy use of TV’s relies heavily on joins. See
http://modxcms.com/forums/index.php?topic=31297.0 for some talk about it with other forum folks.