Sha256: baf6ef058d819f5c17d6f569129bb1c13a0bd3298444853c5a72d52a76773470

Contents?: true

Size: 1.17 KB

Versions: 3

Compression:

Stored size: 1.17 KB

Contents

---
title: Webgen::ContentProcessor::Fragments
---
## Description

This processor generates nested fragment nodes from all headers `h1` to `h6` which have an `id`
attribute set.

> This is only done for the block named `content` or if no block is associated with the given render
> context! This is to ensure that fragment nodes are not created from multiple block of one page
> file. So this content processor has no effect when used in the pipeline of blocks except if the
> block is named `content`.
{.exclamation}

The default markup language Maruku automatically generates an `id` attribute for all headers. If you
use another markup language or plain old HTML, you might need to set the `id` attributes by hand.

> The reason why only header tags with an `id` attribute are used is that only those can be
> referenced and linked to later.
{.information}

The generated fragment nodes can be used like any other node. So you can link to them and use them
in a menu. Concerning the menu, there is a setting for the `tag.menu.used_nodes` option called
`fragments` which only uses the fragment node of the current page to generate a menu. This allows to
generate a nice overview of the page.

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
gettalong-webgen-0.5.5.20081012 doc/contentprocessor/fragments.page
gettalong-webgen-0.5.6.20081020 doc/contentprocessor/fragments.page
webgen-0.5.6 doc/contentprocessor/fragments.page