Fixed Field is a module that displays the same content for all entities the field is attached to, which can be set in the field's settings. The module supports text formats (i.e. filtering) and token support.

This module provides similar functionality to other modules, such as Insert View, Insert Block, Media, EVA: Entity Views Attachment and plain old blocks. However while some of these modules provide methods of attachment of content to individual nodes and blocks provide a very flexible method to attatch content to pages, they have several drawbacks.

  • Insert View, Insert Block and Media attached content cannot be reused on several entities. The content has to be attached to each entity individually.
  • While blocks can be displayed or hidden on different pages, they are limited to theme-defined areas.

Fixed Field aims to bridge the gap between the limitations of other methods of attaching content and the benefits of Drupal's fieldable entities.

Some use cases:

  • embedding ads in nodes
  • put some fixed content on a node like "This week's special is widgets!" on all your products and be able to change them all at once via an admin ui
  • Along with Insert View provide a similar functionality as EVA: Entity Views Attachment, however with more flexibility. For example the position of the view within the node can be set using the fields ui., and views can be wrapped in html or php. For example, tables of views can be created.
  • "Blocks" within nodes
  • Displaying debug information attached to entities. This works especially well with the Token API. This way debugging information can also easily be hidden, simply by hiding the field.

Module sandbox page: http://drupal.org/node/1312726
Git repository:

git clone --branch master marufaberlin@git.drupal.org:sandbox/marufaberlin/1312726.git fixed_field

Module is for Drupal 7

Comments

klausi’s picture

Status: Needs review » Needs work
  • It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git. I think you accidentally created a "7.x-1.x" tag, but it should be a branch.
  • README.txt is missing, see http://drupal.org/node/447604
  • fixed_field_field_prepare_view(): doc block missing. And please document why you even need that function.
  • "// Depending on the entity type, populate token values": all comments should end with a "."
  • "switch ($display['type']) {": only one case here, so better as an if construct.
plonk’s picture

Status: Needs work » Needs review
  • Created 7.x-1.x branch and deleted the 7.x-1.x tag.
  • Added README.txt.
  • Added doc block for fixed_field_field_prepare_view() . please see this comment.
  • Added a "." at the end of "// Depending on the entity type, populate token values".
  • Changed the switch construct to an if construct in fixed_field_field_formatter_view().
klausi’s picture

Status: Needs review » Needs work

git tag 7.x-1.x still present.

plonk’s picture

Status: Needs work » Needs review

oh ok. needed to explicitely push the tags.

klausi’s picture

Status: Needs review » Reviewed & tested by the community

Cool, RTBC for me.

plonk’s picture

Thanks :)

greggles’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution, marufaberlin! Welcome to the community of project contributors on drupal.org.

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

As you continue to work on your module, keep in minde: Commit messages - providing history and credit and Release naming conventions.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.