PHPackages                             planetadeleste/wn-locationtowns-plugin - 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. planetadeleste/wn-locationtowns-plugin

ActiveWinter-plugin[Utility &amp; Helpers](/categories/utility)

planetadeleste/wn-locationtowns-plugin
======================================

Adds towns to states managed by Winter.Location plugin.

2.0.2(5y ago)281MITPHPPHP &gt;=7.0

Since Jul 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/planetadeleste/wn-locationtowns-plugin)[ Packagist](https://packagist.org/packages/planetadeleste/wn-locationtowns-plugin)[ Docs](https://github.com/planetadeleste/wn-locationtowns-plugin)[ RSS](/packages/planetadeleste-wn-locationtowns-plugin/feed)WikiDiscussions master Synced today

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

Location Town plugin for WinterCMS
==================================

[](#location-town-plugin-for-wintercms)

> This plugin is a fork of [VojtaSvoboda.LocationTown](https://github.com/vojtasvoboda/oc-locationtowns-plugin), migrated to [WinterCMS](https://wintercms.com)

Adds towns to states managed by Winter.Location plugin. Included:

- component for state towns with pagination
- component for Town detail
- hooks for Winter.Sitemap
- extends Winter State model

Required plugins: Winter.Location.

Tested with the latest stable WinterCMS 1.1.3.

Render Town detail
------------------

[](#render-town-detail)

This component render town detail. Just create page Town-detail with slug `/town-detail/:slug?` and insert Town component:

[![Town component](assets/images/locationtowns-component-town.png)](assets/images/locationtowns-component-town.png)

To override Town detail template just create partial file `/town/default.htm` as copy of `/plugins/planetadeleste/components/town/default.htm` and make own changes.

Render list of Towns
--------------------

[](#render-list-of-towns)

Create page Towns with slug `/towns/:page?` where page means paginating. Insert component Towns. Set filter for State and select page for show Town detail created above:

[![Towns component](assets/images/locationtowns-component-towns.png)](assets/images/locationtowns-component-towns.png)

To override Towns listing template just create partial file `/towns/default.htm` as copy of `/plugins/planetadeleste/components/towns/default.htm` and make own changes.

Add towns to sitemap
--------------------

[](#add-towns-to-sitemap)

Just install Winter.Sitemap plugin and insert one town or all towns to sitemap:

[![Towns in sitemap](assets/images/locationtowns-sitemap-integration.png)](assets/images/locationtowns-sitemap-integration.png)

Services
--------

[](#services)

List of available services provided by plugin:

### locationtowns service

[](#locationtowns-service)

```
$towns = App::make('locationstown');
$town = $towns->findOneBySlug('praha');
$allTowns = $towns->all();
$townsByState = $towns->where('state_id', 285)->get();

```

### Winter State extension

[](#winter-state-extension)

```
$state = \Winter\Location\Models\State::find('285');
$towns = $state->towns;

```

TODO
----

[](#todo)

- !!fix fixed URL path at Town:114 and Town:129 (there should by path set in component)
- !filter only by active states in towns component
- directly extend Winter.Location.State form to manage towns related to this state
- run plugin without Winter.Location (only town management)
- add select box 'country' to backend listing for filtrating states
- it is not possible to do october:down
- add import and export

**Feel free to send pullrequest!**

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

[](#contributing)

Please send Pull Request to master branch.

License
-------

[](#license)

LocationTown plugin is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT) same as OctoberCMS platform.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 73.9% 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 ~583 days

Total

4

Last Release

1837d ago

Major Versions

1.0.7 → 2.0.02021-04-27

PHP version history (2 changes)1.0.7PHP &gt;=5.4

2.0.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/77cc25e054eed4e6a541926059e4993906ec19126bd23e691906b6f32264a074?d=identicon)[planetadeleste](/maintainers/planetadeleste)

---

Top Contributors

[![vojtasvoboda](https://avatars.githubusercontent.com/u/374917?v=4)](https://github.com/vojtasvoboda "vojtasvoboda (17 commits)")[![alvaro-canepa](https://avatars.githubusercontent.com/u/5142298?v=4)](https://github.com/alvaro-canepa "alvaro-canepa (6 commits)")

---

Tags

pluginlocationcitywintertown

### Embed Badge

![Health badge](/badges/planetadeleste-wn-locationtowns-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/planetadeleste-wn-locationtowns-plugin/health.svg)](https://phpackages.com/packages/planetadeleste-wn-locationtowns-plugin)
```

###  Alternatives

[winter/wn-blog-plugin

Blog plugin for Winter CMS

2042.1k3](/packages/winter-wn-blog-plugin)[winter/wn-sitemap-plugin

Sitemap plugin for Winter CMS

1042.6k1](/packages/winter-wn-sitemap-plugin)[getkirby/geo

Kirby Geo

223.5k](/packages/getkirby-geo)[martin/wn-forms-plugin

Create easy (and almost magic) AJAX forms

212.3k](/packages/martin-wn-forms-plugin)

PHPackages © 2026

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