Drupal Association members fund grants that make connections all over the world.
Dynamic Field is a CCK field that returns a textarea where you can enter custom PHP code. The code is computed real-time and lets you access Drupal objects like $node, $user...
This is not a duplicate of ComputedField! ComputedField computes and saves the value in the database when the node is created but Dynamic Field doesn't store the computed value...it computes the php whenever the node is rendered in the theme.
All you need to do is place the PHP directly into the CCK field without the <? ?> tag.
Below is an example to return the Node ID:
$nid = $node->nid; return $nid;
Another example to return the Content Type:
$ntype = $node->type; return $ntype;
This project is sponsored by SourceN. We provide specialist consulting services in Enterprise Drupal, Views & Panels, Visit us at www.sourcen.com or Contact us.
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Content Construction Kit (CCK)
- Reported installs: 270 sites currently report using this module. View usage statistics.
- Downloads: 4,513
- Last modified: December 1, 2014
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.