A CCK content field which lets you add a complete iframe to your content types; including Src-URL, setting width and height, optionally a title above, and optionally a target attribute.

Requires the content module (CCK).

The module iframe is based upon project Link by quicksketch

The iframe module provides a content "field" type for CCK. It provides three fields to an authorized user:

  • Src-URL (textfield)
  • Width of iframe (textfield), allowed: numbers (in px, without "px") btw. percents (e.g. "70%")
  • Height of iframe (textfield), dito
  • Title (textfield), optionally
  • Attributes for "frameborder" and "scrolling" (selects)

"Title" can be optionally enabled or disabled when setting up the content field.

If you were to create a field named 'MyIframe', the default display of the link would be:

<div class="field_myiframe">
  <h3>[Title]</h3>
  <iframe src="[URL]" width="[width]" height="[height]" target="[target_value]">[URL]</iframe>
</div>

where items between [] characters would be customized based on the user input.

Installation

  • Drop the entire iframe module directory into your 'sites/all/modules' folder
  • Enable the module from the Administration area modules page (admin/build/modules)
  • Create or Edit a CCK content-type and add a new field of type iframe (admin/content/types)

Configuration

Configuration is only slightly more complicated than a text field. Title for iframe can be made required, optional (default), or left out entirely. If no title is provided, there will not be displayed any extra heading.

Theming

You can find more information on how to theme the output (and all other CCK fields) at the CCK Handbook on Theming Individual Fields

Help

If you have questions or trouble, please post to the issue tracker rather than the forum.

Pledges

#D7CX: Fields are in core in Drupal 7. The migration iD6-to-D7 via cck/content_migrate module now works completely (all attributes will be migrated too)!

Migration D6-to-D8 works basicly (url is migrated). Migration D7-to-D8 is straight forward without difficulties, because both use the field api from drupal core.

Project Information

Downloads