Versions

TemplateHelper.fwaction (2013-11-22) (Downloaded 32 times)

Contains:

  • style_accessors (library-action) - v. 1.2.5
  • TemplateHelper (item-action) - v. 0.6.1

Compatible: Pro 5, Pro 5.5, and Pro 6

TemplateHelper.fwaction (2013-01-22) (Downloaded 1 time)

Contains:

  • style_accessors (library-action) - v. 1.2.1
  • TemplateHelper (item-action) - v. 0.6

Compatible: Pro 4, Pro 5, Pro 5.5, and Pro 6

TemplateHelper.fwaction (2012-06-13) (Downloaded 0 times)

Contains:

  • TemplateHelper (item-action) - v. 0.5.4

Compatible: Pro 4, Pro 5, and Pro 5.5

TemplateHelper.fwaction (2012-05-08) (Downloaded 0 times)

Contains:

  • TemplateHelper (item-action) - v. 0.5.3

Compatible: Pro 4, Pro 5, and Pro 5.5

TemplateHelper.fwaction (2012-02-03) (Downloaded 0 times)

Contains:

  • TemplateHelper (item-action) - v. 0.5.2

Compatible: Pro 4, Pro 5, and Pro 5.5

TemplateHelper.fwaction (2011-09-29) (Downloaded 0 times)

Contains:

  • TemplateHelper (item-action) - v. 0.5.1

Compatible: Pro 4, Pro 5, and Pro 5.5

TemplateHelper.fwaction (2011-07-03) (Downloaded 0 times)

Contains:

  • TemplateHelper (item-action) - v. 0.5

Compatible: Pro 4 and Pro 5

TemplateHelper.fwaction (2009-10-22) (Downloaded 0 times)

Contains:

  • TemplateHelper (item-action) - v. 0.4

Compatible: Pro 4 and Pro 5

TemplateHelper.fwaction (2009-03-09) (Downloaded 0 times)

Contains:

  • TemplateHelper (item-action) - v. 0.3

Compatible: Pro 4 and Pro 5

Author: Walter Davis

cms template server content management

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.

0 Comments

Sign In or Sign Up to comment.