[TYPO3-english] Viewhelper for Alphabetical Index
Torsten Schrade
schradt at uni-mainz.de
Fri Jun 28 23:09:03 CEST 2013
Hi Dirk,
> I'm using extension news (tx_news) to build a catalog raisonné.
> I'd like to group all entries in list view by the first character
> (alphabetical index).
>
> Hiding all characters without matching entries would be nice.
>
> Is there any Viewhelper or another trick to archieve that?
>
> Thanks in advance.
>
> Cheers Dirk
Now that's a funny coincidence… some months ago we did a catalogue
raisonné extension for one of our digital humanities projects [1] and
needed an alphabet ViewHelper for displaying alphabetical registers
[2]. The ViewHelper is used in a f:for loop and segmentizes ordered
lists of strings by comparing starting letter(s). It creates only
letters for which there are entries. Here are two gists:
* Template: https://gist.github.com/tesselation/5888003
* ViewHelper: https://gist.github.com/tesselation/5888020
Maybe it's of some use to you. Have fun,
Torsten
[1] http://www.gluck-gesamtausgabe.de/gwv.html
[2] http://www.gluck-gesamtausgabe.de/gwv/werkregister.html
More information about the TYPO3-english
mailing list