Items

There isn't much markup "structure" provided here, but that is by design. The idea is not to do too much by default, but allow the front-end developer to easily define the structure if needed (yes, that's right - it's the front end developers choice to add markup). This simple pattern can apply to a variety of different use cases in a clean and consistent manner.

  • $item makes up rendered style types, similar to field formatters.
  • More than one $item can be used to make up a piece of $content.
  • More often than not, extra "container" markup is not required to get the job done when dealing with nested $items. If a $container is needed, the structural container component should be used to wrap it.

item.tpl.php

<?php print render($items); ?>

Requirements

  • No wrapper markup. Formats should be used wherever possible.
  • Even though they are not printed in this example, $attributes, $item_attributes and the rest of the variables here should be available.
  • Theme hook suggestions or some similar functionality should be enabled for each instance so it's possible to customize. More information will be provided for suggested default formats/components.

Simple Examples

<a href="#">one</a> | <a href="#">two</a> | <a href="#">three</a>
one, two, three
<img src="#" alt="one">
<img src="#" alt="two">
<img src="#" alt="three">
<label for="one">Label for one</label>
<input type="text" name="one">
<div class="description">Some form element description.</div>

This could deprecate and/or improve