This Action cuts an element out of the Freeway page. There are two practical applications for this:

To make a “scratch” element disappear

Imagine you are laying out the outer shell of a templated page. You plan to include a number of sub-page elements, but you need to ensure that any text styles used by those elements will be published into the page by Freeway.

Draw an HTML box on the pasteboard, fill it with examples of the styles you need, and apply TemplateHelper to it. When you publish, the element will not be published to the page, but the styles referenced by it will be.

To create a “partial” or sub-page element to be used by a templating engine

If you are using a templating system to lay out your page in a dynamic or database-driven manner, you will need to create cut-down elements – “partials” in the Rails jargon – that can be substituted into the page. If you were to lay these out as separate pages, they would include a HEAD and BODY tag, and your composite page would fail validation, or worse, fail to display in picky browsers.

Draw your partial element as a nested or grouped DIV, and apply the TemplateHelper to it. Check the “make partial” control in the Actions palette, and select your desired file-type extension and partial name. You may also apply the Action to a table cell, in which case the partial will be made out of the entire table row.

When you publish, the selected item will be completely removed from the page code, and its contents will be published into a new file, alongside the parent page in the site hierarchy, and named in this manner: _PartialName.extension. Any styles needed by the partial will remain in the parent page, so it is a good idea to cut the partials out of the parent page that will receive them later.

There are options to remove IDs, positioning and sizing information, and the entire Style tag. You would want to remove IDs when you plan to use a partial inside of a loop, otherwise the ID would be repeated within the page and your page would be invalid.