PHPackages                             codecraft/silverstripe-pathfinder - 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. codecraft/silverstripe-pathfinder

ActiveSilverstripe-vendormodule

codecraft/silverstripe-pathfinder
=================================

Lead visitors to content with a succession of questions and answers that suggest content tagged by taxonomy terms

0.1.x-dev(3y ago)01.0k3[5 issues](https://github.com/codecraft/silverstripe-pathfinder/issues)[12 PRs](https://github.com/codecraft/silverstripe-pathfinder/pulls)BSD-3-ClausePHP

Since Apr 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/codecraft/silverstripe-pathfinder)[ Packagist](https://packagist.org/packages/codecraft/silverstripe-pathfinder)[ RSS](/packages/codecraft-silverstripe-pathfinder/feed)WikiDiscussions 0.1 Synced 6d ago

READMEChangelogDependencies (5)Versions (12)Used By (0)

SilverStripe Pathfinder
=======================

[](#silverstripe-pathfinder)

Introduction
------------

[](#introduction)

This module enables CMS users to create a succession of questions and answers, which then suggests content to visitors using tags (taxonomy), acting as a pathfinder to pages on the site.

Requirements
------------

[](#requirements)

See the "require" section of [composer.json](https://github.com/codecraft/silverstripe-pathfinder/blob/master/composer.json)

Relies on [silverstripe/silverstripe-taxonomy](https://github.com/silverstripe/silverstripe-taxonomy)

Features
--------

[](#features)

- Create paths of questions and answers that, when completed, suggest content to the user
- Customise Pathfinder content:
    - Introduction wording
    - Results found wording
    - No Results found wording
    - Support wording (Displayed on results page)
- Control content suggestions by tagging Pages with Taxonomy Terms
- Answers can be single-choice or multi-choice
- Questions can be organised in Flows, making CMS usage easier and diversifying pathing logic
- Pathfinders can be created as a Page or added as an Extension to existing models
- Users' progress is preserved when navigating away from a partially completed Pathfinder
- Multiple and customisable progress storage types
- Shortcodes provided to help author Pathfinder content
- Can be customised with extensions

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

[](#installation)

```
composer require codecraft/silverstripe-pathfinder

```

Configuration
-------------

[](#configuration)

### Progress Store

[](#progress-store)

Pathfinder uses a `ProgressStore` to dynamically track the progress of a user. This is how the Pathfinder knows which path the user is on, based on their precession of answers.

The default ProgressStore is the `SessionProgressStore`, and stores progress in the user's PHP session.

To change the session store, update the `ProgressStore` injector configuration, to assign the `class` of the progress store you need:

```
SilverStripe\Core\Injector\Injector:
  CodeCraft\Pathfinder\Model\Store\ProgressStore:
    class: CodeCraft\Pathfinder\Model\Store\SessionProgressStore
```

#### Available Progress Stores

[](#available-progress-stores)

- `CodeCraft\Pathfinder\Model\Store\SessionProgressStore` - **(Default)** Stores progress in the PHP session. **Expires when the user's session expires**
- `CodeCraft\Pathfinder\Model\Store\RequestVarProgressStore` - Stores progress in an encoded URL request variable. **Expires when the URL request variable is discarded.**
- `CodeCraft\Pathfinder\Model\Store\LocalStorageProgressStore` - Stores progress in Local storage. **Expires when local storage is cleared.**

#### Create a custom Progress Store

[](#create-a-custom-progress-store)

A custom progress store can be created by subclassing `CodeCraft\Pathfinder\Model\Store\ProgressStore` and modifying the `Injector` configuration.

Example subclass:

```
