Text snippet

Component ID

2696349

Component name

Text snippet

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

13

Component created

Component changed

Component body

Text snippet is a simple module aiming at solving a very common task - creating small (static) text chunks, which can be placed in a site via the block system, as a content pane or even as a token. Typical use-case would be if you need to provide a block with text which should be placed in the footer of your site. Your site-editor would only need to edit their texts on the text snippet UI page.

Text snippets are exportable entities, so their configuration can be stored in code. The good thing is that the content of a text snippet is provided via the Field API (every text snippet entity gets a single long_text field) and is handled as content (not exported). This means it can be changed by site editors, without having to re-export the feature, which configures its' placement.

The (possibly) most important thing is that as entities text snippets have support for translation via the Entity translation module. So as a site administrator you actually only need to define where and how the text snippet is placed, content and translating is a task of your site editors.

Todos

Provide a configurable option to provide each text snippet with its own permission, so that access to content editing/translating can be gained on a per role basis.

Drupal 8

You can achieve most of what Text snippet does in Drupal 7 through the "Custom blocks"-way in Drupal 8, which is great!