PHPackages                             wernerkrauss/silverstripe-onepage - 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. [Framework](/categories/framework)
4. /
5. wernerkrauss/silverstripe-onepage

ActiveSilverstripe-vendormodule[Framework](/categories/framework)

wernerkrauss/silverstripe-onepage
=================================

An extension for simple one-page sites

0.9.0(8y ago)64343[4 issues](https://github.com/wernerkrauss/silverstripe-onepage/issues)MITPHP

Since Sep 29Pushed 4y ago3 watchersCompare

[ Source](https://github.com/wernerkrauss/silverstripe-onepage)[ Packagist](https://packagist.org/packages/wernerkrauss/silverstripe-onepage)[ RSS](/packages/wernerkrauss-silverstripe-onepage/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (11)Used By (0)

Silverstripe One Page Module
============================

[](#silverstripe-one-page-module)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0a3ab368000cb7acbdf49ec7b09360fa5ebe883eb7addfb8465c778b984003a6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7765726e65726b72617573732f73696c7665727374726970652d6f6e65706167652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/wernerkrauss/silverstripe-onepage/?branch=master)

This module provides a basic skeleton to build one-page sites easily.

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

[](#installation)

Best installed via composer. You may clone the repo or download the zip, however you should find a directory called "onepage" with all files in your silverstripe root folder.

### using Composer

[](#using-composer)

```
composer require wernerkrauss/silverstripe-onepage dev-master

```

### Requirements

[](#requirements)

- Silverstripe 4
- [Heyday Colorpalette](https://packagist.org/packages/heyday/silverstripe-colorpalette)

For a SS3 compatible version see [v0.3.1](https://github.com/wernerkrauss/silverstripe-onepage/tree/0.3.1)

Features
--------

[](#features)

- Pick colors for each slide: background, header and text
- Define a background image for each slide
- Define an extra css class for each slide to be extra flexible
- Slides redirect to the parent holder when called directly

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

[](#configuration)

You can define the colors for picking in your config.yml as key value pairs globally or for each page type, e.g.

```
Page:
  background_color_palette:
    - '#fff'
    - '#aacccc'
    - '#ccaaaa'
    - '#000'
```

You can limit the additional fields (colors and background images) in the layout tab to onepage slides only:

```
Netwerkstatt\Onepage\Extensions\OnePageSlide:
  use_only_on_onepage_slides: true
```

You can set empty defaults and switch off the need to choose colors by setting:

```
Netwerkstatt\Onepage\Extensions\OnePageSlide:
  colors_can_be_empty: true
```

Usage
-----

[](#usage)

### Basic setup

[](#basic-setup)

Define a page as page type "One Page Holder" and add some child pages. In the tab "Layout" you can add all extra stuff like background image, colors or css-class. That's all!

[![OnePage Module CMS screenshot](https://github.com/wernerkrauss/silverstripe-onepage/raw/master/docs/images/onepage-screenshot-cms.jpg)](https://github.com/wernerkrauss/silverstripe-onepage/blob/master/docs/images/onepage-screenshot-cms.jpg)

### Different page types

[](#different-page-types)

You can of course use any page type as a slide. Simply create an own template for inclusion as a slide and add the suffix "\_onepage" to it's name. See the included file [Page\_onepage.ss](templates/Includes/Page_onepage.ss)

If your page type supports multiple layouts (e.g. by a dropdown) you can add a function called `generateOnePageTemplateSuffix()` in your page like this:

```
	public function generateOnePageTemplateSuffix() {
		return '_' . $this->Layout . '_onepage';
	}

```

This way you can render the slide with a template called like "Page\_layout1\_onepage.ss"

Tips
----

[](#tips)

### Navigation and scrolling to slides

[](#navigation-and-scrolling-to-slides)

Navigaton / scrolling to slides can be done e.g. using the [OnepageNav jQuery plugin](http://github.com/davist11/jQuery-One-Page-Nav) which is not bundled with this module.

A possible javascript for setting it up could be:

```
$(function($){
    //remove pathname from slide links if they are on the current page
    $.when(
        $('#MainNavList').find('a').each(function(){
            if ($(this).prop('pathname') == window.location.pathname) {
                $(this).prop('href', $(this).prop('hash'));
            } else {
                $(this).addClass('external');
            }
        })
    ).done(function(){
        //initialize onepage nav
        $('#MainNavList').onePageNav({
            currentClass: 'current',
            changeHash: false,
            scrollSpeed: 750,
            scrollThreshold: 0.5,
            filter: ':not(.external)',
            easing: 'swing'
        });
    });
});

```

Showcases
---------

[](#showcases)

You can see the module in action on this sites:

-
-
-
-

Feel free to add your project to this list.

Alternatives
------------

[](#alternatives)

There are some block builder modules for SilverStripe out there. The default module for SilverStripe 4 is [Elemental](https://github.com/dnadesign/silverstripe-elemental).

Contributing
------------

[](#contributing)

Feel free to file issues or submit pull requests.

### Translating

[](#translating)

This module makes translates all strings via [Transifex](https://www.transifex.com/projects/p/silverstripe-onepage/).

Todo
----

[](#todo)

- --scroll to slide (important!)-- see tip above
- --redirect slide page to OnePageHolder#Slide--
- --use separate templates for page types to include as slide--
- --i18n--
- create unit tests
- use focuspoint module for background images
- refactor and improve

Licence
-------

[](#licence)

[MIT Licence](LICENSE)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~306 days

Recently: every ~503 days

Total

9

Last Release

1791d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff3ee546a6d1b1092f1badf68523ba30f28dec7fce11254a8cb3aeb57c6202de?d=identicon)[wernerkrauss](/maintainers/wernerkrauss)

---

Top Contributors

[![wernerkrauss](https://avatars.githubusercontent.com/u/1043925?v=4)](https://github.com/wernerkrauss "wernerkrauss (63 commits)")[![Greg808](https://avatars.githubusercontent.com/u/32903200?v=4)](https://github.com/Greg808 "Greg808 (1 commits)")

---

Tags

silverstripeextension

### Embed Badge

![Health badge](/badges/wernerkrauss-silverstripe-onepage/health.svg)

```
[![Health](https://phpackages.com/badges/wernerkrauss-silverstripe-onepage/health.svg)](https://phpackages.com/packages/wernerkrauss-silverstripe-onepage)
```

###  Alternatives

[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[silverstripe/cms

The SilverStripe Content Management System

5163.4M1.3k](/packages/silverstripe-cms)[dnadesign/silverstripe-elemental

Elemental pagetype and collection of Elements

1151.0M255](/packages/dnadesign-silverstripe-elemental)[silverstripe/behat-extension

SilverStripe framework extension for Behat

32564.2k5](/packages/silverstripe-behat-extension)[cwp/cwp

CWP features module. We strongly recommend using it for all new sites. Future features will be delivered here.

11221.1k6](/packages/cwp-cwp)[swipestripe/swipestripe

Ecommerce module to create online shops using SilverStripe.

336.4k9](/packages/swipestripe-swipestripe)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
