PHPackages                             silverstripers/continental-content - 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. silverstripers/continental-content

AbandonedSilverstripe-module[Utility &amp; Helpers](/categories/utility)

silverstripers/continental-content
==================================

Lets you add contents for different continents

1.0.1(8y ago)1491[1 PRs](https://github.com/SilverStripers/continental-content/pulls)BSD-3-ClausePHP

Since Dec 28Pushed 8y ago1 watchersCompare

[ Source](https://github.com/SilverStripers/continental-content)[ Packagist](https://packagist.org/packages/silverstripers/continental-content)[ RSS](/packages/silverstripers-continental-content/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Continental Content Module
==========================

[](#continental-content-module)

A SilverStripe module which allows you to have contents specific for locations, and serve these contents for users by checking their location.

Installing
==========

[](#installing)

Use composer to install the module.

`composer require silverstripers/continental-content dev-master`

Configuring
===========

[](#configuring)

After installing the module on your SilverStripe site, you have to manually specify which data objects you want the module to decorate with in order to have different contents.

```
SiteTree:
  extensions:
    - ContinentalContent

```

You have the freedom to decorate any object, in this YAML i am decorating the SiteTree object, which is the base object of SilverStripe pages.

### Setting up location

[](#setting-up-location)

Once you've done the above you can set up the locations which you want to have different contents for.

```
ContinentalContent:
  continents:
    BC:
      Country: CA
      SubDivision: BC
    AB:
      Country: CA
      SubDivision: AB
    ON:
      Country: CA
      SubDivision: ON

```

If you want to use contents for a group of location then you can group them by.

```
ContinentalContent:
  continents:
    Europe:
      Country:
        - GB
        - GE
        - FR
    NZ:
        Country: NZ
    AU:
        Country: AU

```

In this example Europe will be used for GB, GE, FR countries.

What if you dont want to have multiple fields
---------------------------------------------

[](#what-if-you-dont-want-to-have-multiple-fields)

If there are fields which you dont wish to customise for each of the locations, you can specify them as configs

```
ContinentalContent:
  exclude_field_names:
    - SiteTree.Title
    - URLSegment

```

The above removes URLSegment from any of the data objects you have a field called URLSegment, but it removes Title only from SiteTree.

Seperate URLS
-------------

[](#seperate-urls)

If you want to have separate urls for each location eg: site.com/uk/home, site.com/nz/home etc. You can allow that with another config.

```
ContinentalContent:
  custom_urls: 'Y'

```

Webserver cant read the visitors IP ? (Higher Level Customizations)
-------------------------------------------------------------------

[](#webserver-cant-read-the-visitors-ip--higher-level-customizations)

Sometimes this can happen, if you are using several load balancers to and have your website behind them and your load balancers wont pass the end clients IP. In this can use can set up a form and ask your users to select the location they are coming from.

```
ContinentalContent:
  proxy_ip: '0.0.0.0'

```

set up the IP which your webserver gets all the time.

make a function like the following in Page\_Controller class.

```
function LocationDetected(){
  return !(ContinentalContent::IsViewingThroughProxy() && ContinentalContent::CurrentContinent() == CONTINENTAL_DEFAULT);
}

```

If the above returns true you can draw a location selector to select the visitor's location.

Setting up IP database
======================

[](#setting-up-ip-database)

The module only supports max mind, upload the max mind City data base from the site config.

Debug options
=============

[](#debug-options)

There are several options to debug the configs. You can pass three get vars

1. FAKE\_IP -- fake the ip address
2. CLEAR\_IP -- clear the ip from the session
3. debug\_location -- Displays a debug message on screen for the locations.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~138 days

Total

3

Last Release

3153d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6a6fa4ab2a74fee1ac574bf15dd3ce1f38f31fee60c186b4b24ee8d7e3090b52?d=identicon)[silverstripers](/maintainers/silverstripers)

---

Top Contributors

[![fonsekaean](https://avatars.githubusercontent.com/u/143939?v=4)](https://github.com/fonsekaean "fonsekaean (38 commits)")

---

Tags

silverstripecontentsip2locationcontinentaliptolocation

### Embed Badge

![Health badge](/badges/silverstripers-continental-content/health.svg)

```
[![Health](https://phpackages.com/badges/silverstripers-continental-content/health.svg)](https://phpackages.com/packages/silverstripers-continental-content)
```

###  Alternatives

[silverstripe/multi-domain

Allows multiple domains to access one CMS instance, mapping them to different sections of the hierarchy

141.6k](/packages/silverstripe-multi-domain)

PHPackages © 2026

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