Sha256: 2339fcdfa5481b140505413e74b6afe034ed929d4425ad963d0482fd54cfdcdf

Contents?: true

Size: 1.16 KB

Versions: 9

Compression:

Stored size: 1.16 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`.
{.warning}

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

9 entries across 9 versions & 3 rubygems

Version Path
gettalong-webgen-0.5.7.20090227 doc/contentprocessor/fragments.page
gettalong-webgen-0.5.8.20090507 doc/contentprocessor/fragments.page
gettalong-webgen-0.5.9.20090620 doc/contentprocessor/fragments.page
gettalong-webgen-0.5.9.20090626 doc/contentprocessor/fragments.page
thewoolleyman-webgen-0.5.8.20090419 doc/contentprocessor/fragments.page
webgen-0.5.10 doc/contentprocessor/fragments.page
webgen-0.5.9 doc/contentprocessor/fragments.page
webgen-0.5.7 doc/contentprocessor/fragments.page
webgen-0.5.8 doc/contentprocessor/fragments.page