Hi everyone,
I’m glad you like the new features and shope it will be of interest the modx community.
Many thanks for the kind words.
@Paul,
Quote from: PaulGregory at Jul 31, 2006, 04:55 AM
A content table that any tom dick or harry can edit easily.. can be used as if it was a database table?
Yes that’s the general idea. It was designed to make it a little easier for users working with small amounts of data.
&source=`AnHTMLChunk`
How feasible is it to use this to actually send a mail then? Would one just have a hidden page with a snippet that sent mail?
Yes it can be done with the help of a snippet. What you will have to do is format the mails ins such a way that when it’s passed to the snippet you can break it apart and send it as separate emails:
[[EMailer?content=`[[:REPEAT-WHILE?source=`[[$MailList]]` &tpl=`[[$Mail]]` ]]` ]]
To make it easier for Snippet developers I’ll create an API that allows you to read the data from an html table. Example:
<?php
$table = $modx->loadExtension('HTMLTable');
$table->open($content); // reads in first table
$name = $table->get('name'); // reads name column of current row
$table->moveNext(); // moves to next row;
$num = $table->rowCount();
$c = $table->getCell(5,20); // read the cell located at x,y
$row = $table->fetch(); // fetch row from table
// or maybe something like
$result = $table->merge($template);
// insert the fields from the current row into the template
?>
With the above a developer could easily create a snippet that can use a simple html table as the data source:
[[SnippetA? &content=`[[$MyContacts]]` ]]
One of the nice things about using an html table is that the user can easily add richtext content to a cell.