Keywords
Project page quote (external) Tokens are small bits of text that can be placed into larger documents via simple placeholders, like %site-name or [user]. The Token module provides a central API for modules to use these tokens, and expose their own token values.
Note that Token module doesn't provide any visible functions to the user on its own, it just provides token handling services for other modules.
For Drupal 6, the Token module provides a "Token Actions" module which can be enabled separately. This provides several "actions" for the Drupal core Actions/Trigger modules to use that take advantage of the Token replacement functionality.
Modules that use the Token module and provide tokens via the API include Organic Groups, Pathauto, Comment Notify, and Commerce.
The basic token API is now a part of Drupal 7! Unfortunately, other things like the a browsable token UI, and field & profile tokens did not make it into core and will be supported here for Drupal 7.
TODO: this content is incomplete, unfinished, or under construction.
Keywords
Project page quote (external) This module allows the admin account (user 1) to add fields, filters and sorts to views which use PHP code. It also supports additional accounts when the core PHP Filter module is enabled.
This is the successor of Views Custom Field for both D6 and D7. The D6 version supports both Views 2 and Views 3.
Note
While this module allows you to directly use PHP inside views which may be useful for quick and easy solutions, it is highly advisable to use regular handlers and plugins when available (or even to create one yourself). Take note that filtering and sorting a view using PHP always has a considerable perfomance impact.
Alternatives
An alternative to this module is Computed field. It lets you add an actual field to your entities where you specify the PHP code you'd like to run. You can store the computed result in the database or have it run on the fly when viewed directly or through Views. It also lets you implement hooks in your own modules which hold your computation code so it can be version controlled. Views PHP doesn't have this ability, but there's a feature request for this over at #1326780: Provide function templates for code to use instead of text areas .
There is a lot of overlap with Computed Field (which is easier if your focus is on generating content for fields, rather than Views support).
HOT TIP: this content is flagged as highly recommended !
Keywords
Project page quote (external) Computed Field is a very powerful field module that lets you add a custom "computed fields" to your content types. These computed fields are populated with values that you define via PHP code. You may draw on anything available to Drupal, including other fields, the current user, database tables, you name it. (Feeling the power yet? :) ) You can also choose whether to store your computed field values in the database with other content fields, or have them "calculated" on the fly during node views. (Although you should note that Views use requires database stored values.) This field is literally the Swiss Army knife of fields. So start cooking up your PHP based values!
...
Keywords
Project page quote (external) A filter allowing you to insert a node wherever the InsertNode filter is available. It can be used to create macros, insert book links, create a link to a node showing its title, etc.
The complete documentation is now available at Made to Order Software:
http://www.m2osw.com/doc-insert-node .
It is important to read that documentation to be able to use this filter fully. It is powerful!
This is an extremely powerful input filter with a huge number of options and applications, but if you just want to insert the content of one node into another Node Embed suffices, and has a Drupal7 version.
HOT TIP: this content is flagged as highly recommended !
Keywords
Project page quote (external) Have you ever wanted to include the rendering of node within the content of another node? For example, embedding an Image/Slideshow/Video node within the body of an Article node. Or the embedding of an Author node as a bio block within a blog posting? Node Embed allows you to do that.
Node Embed provides an input filter for CKEditor & FCKEditor integration allowing a content editor the ability to embed the rendering of nodes within the body/fields of another node. This uses a View to allow for the browsing/preview/selection of a node to embed and provides a set of template suggestions that allow for the detailed control of node rendering when in embedded mode.
See documentation for more details.
Absolutely brilliantly simple must have module. Install it always and switch it on. Promotes Don't Repeat Yourself (DRY Principle) authoring !
The Drupal7 version includes many improvements, including options for the display mode for the inserted node (such as view_mode=teaser).
It currently however only gets 4 stars out of 5, because it suffers from a number of bugs, or at least has trouble handling some trickier cases; see ISSUE links below.
TODO: this content is incomplete, unfinished, or under construction.
HOT TIP: this content is flagged as highly recommended !
Keywords
Project page quote (external) Insert View is a filter that allows users to embed content lists generated by the Views module into node bodies and blocks using relatively simple tag syntax.
Why would you want to use an Insert View tag when you could just invoke a view using PHP? Simple. When you want to allow users to insert views or edit content on a page with an inserted view without granting them permission to use PHP.
The tag syntax is:
</b>
The parameters are: view name, view display id, view arguments.
Valid examples:
is replaced by the content listing.
invokes the view using the specified display.
invokes the view using the specified display and passes arg1, arg2 and arg3 to the view.
passes arg1 to the view and will use the "default" display set for the view.
Keywords
Project page quote (external) 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...
Note:
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.
Usage:
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;
Very handy. Can also be used to create "static" text fields ! But not yet for Drupal7 ! . For a Drupal7 compatible equivalent, see instead Computed Field .
Keywords
Project page quote (external) Static field module enable a Field API field containg static text that can be configured on a per instance basis.
This module is a very handy little addition for Drupal7.
For Drupal6 one can use Dynamic Field [Drupal6] , which can also be used of course for static text:
HOT TIP: this content is flagged as highly recommended !
Keywords
Project page quote (external) The Rep[lacement]Tags module allows you to define tags (like $MYTAG$ or {DATE} as 'tokens' or 'markdown') and replace them with :
- user-defined content (custom text, images, code, ...),
- dynamically-generated or system values,
- or use RepTag to format your pages with simple markup-style tags.
Embed Drupal Blocks, Node metadata, User info, Images and videos with plain-text syntax like:
{BLOCK:image:Random image} {AUTHOR} {YOUTUBE:Z4VNMERVsC4}
Should be compatible with both WYSIWYG and plaintext editors.
HOT TIP: this content is flagged as highly recommended !
Keywords
Project page quote (external) Once installed .. you (or any user who can post) can add an embedded href link to any node using the syntax (where N is a number, and NNN is a node id):
Parameters follow the part and are comma separated name="value" pairs:
[node:NNN,title="Original version of the picture"]