PHPackages                             netglue/prismic-linklist-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. netglue/prismic-linklist-helper

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

netglue/prismic-linklist-helper
===============================

Helper for managing menus and lists of links stored in a Prismic.io repository

0700PHP

Since Jun 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/netglue/Prismic-Linklist-Helper)[ Packagist](https://packagist.org/packages/netglue/prismic-linklist-helper)[ RSS](/packages/netglue-prismic-linklist-helper/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Prismic.io Link List Helper
===========================

[](#prismicio-link-list-helper)

**This Helper library is no longer maintained**

I'm in the habit of creating lists of links to use throughout content managed websites built using [prismic](https://prismic.io). This means that the end user can manage primary site navigation easily and re-order links as they see fit.

Link lists have to contain a group type fragment where each fragment within the group is used to create the link itself. One drawback to Prismic is the inability to nest group fragments, so this helper identifies links to other link lists and uses these to generate sub menus in the same way as a flat menu.

For an example 'link-list' document type, [see the JSON file included](https://github.com/netglue/Prismic-Linklist-Helper/blob/master/data/link-list.json).

You'll see that amongst other stuff, there is a group fragment named 'links', this what the helper iterates over to generate lists.

This package is purposefully minimal to avoid assumptions about the DI container in use and to be templating system agnostic. All you get is an array so it's up to you to render that however you see fit.

Installation
------------

[](#installation)

```
$ composer require netglue/prismic-linklist-helper
```

Usage
-----

[](#usage)

The helper requires a `Prismic\Api` instance and an object that extends `Prismic\LinkResolver`. It's expected that you'll create some kind of factory to return a properly constructed helper using whatever DI container you choose. It might go something like this:

**MyHelperFactory.php**

```
