Hi... I don't remember if I'd asked this or not... or maybe I posted it in the wrong place...
I was just wondering if it was possible to pull in dynamic content via one of the CCK custom fields.
For example, if I made a field that was a text area... would I be able to paste in some type of php code that could pull in data from a table or something like that... or like from an external text file...
Just wondering if that's possible.
Thanks.
-Jeff

Comments

dgeilhufe@yahoo.com’s picture

The CiviNode module basically does this. It brings in CiviCRM data into a CCK node. If the CiviCRM data changes, the CCK node display changes.

http://drupal.org/node/56661

Might give you some ideas.

David Geilhufe
Managing Partner, CivicSpace

markj’s picture

Configure your CCK text field so that you can use the PHP Code input format. Then enter the following:

<?php
$URL = 'http://urltoyourexternalfile/test.txt';
ob_start();
include_once $URL;
$output = ob_get_contents();
ob_end_clean();
return $output;
?>

The contents of the remote test.txt will show up in your CCK node.