User Tools

Site Tools


g2:howto

This is an old revision of the document!


G2 HOWTO. Or "How do I ..."

How do I create an alphabar unlike the predefined block ?

Context

The predefined alphabar block provides a standard form alphabar, listing all initials in the alphabar setting with a link to the page for each initial. The block configuration page allows setting of both the alphabar and line-length wrapping.

However I does not allow for bar where, for instance, some initials would be merged (like grouping the numbers together under “#”, for instance).

Solution

The trick is not to use the predefined block, but the function supplying it with data: _g2_alphabar(), which returns the current list of initials. With the result of this function, it is possible to visually build the bar to your wished, while retaining dynamic compliance with the actual alphabar contents.

g2/howto.1135620796.txt.gz · Last modified: 2020/11/23 17:23 (external edit)