PHPackages                             rah/zem\_nth - 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. rah/zem\_nth

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

rah/zem\_nth
============

Step in a list plugin for Textpattern

0.3.0(12y ago)0281GPL-2.0PHP

Since May 5Pushed 12y ago2 watchersCompare

[ Source](https://github.com/gocom/zem_nth)[ Packagist](https://packagist.org/packages/rah/zem_nth)[ Docs](https://github.com/gocom/zem_nth)[ RSS](/packages/rah-zem-nth/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (2)Versions (5)Used By (0)

zem\_nth
========

[](#zem_nth)

[Download](https://github.com/gocom/zem_nth/releases) | [Packagist](https://packagist.org/packages/rah/zem_nth) | [Twitter](http://twitter.com/gocom) | [Donate](http://rahforum.biz/donate/zem_nth)

Step in a list. The zem\_nth plugin adds a conditional tag to [Textpattern CMS](http://textpattern.com), which can be used to matches every nth item in a group of items based on the given step and group of. This tag works similarly to the [:nth-child](https://developer.mozilla.org/en-US/docs/CSS/:nth-child) pseudo-selector found in CSS.

Installing
----------

[](#installing)

Using [Composer](http://getcomposer.org):

```
$ composer require rah/zem_nth:*
```

Or [download](https://github.com/gocom/zem_nth/releases) a plugin package.

Tag attributes
--------------

[](#tag-attributes)

```

	...every third...

	...first and second...

```

The tag can also be used as a single, self-closing tag to return the current counter value:

```

```

Attributes are as follows:

**step**
The step to jump.
Example: `step="2"` Default: `"2"`

**of**
Step of how many.
Example: `off="4"` Default: `undefined`

**id**
The identifier assigned to the counter. By default counters are identified by their contents. If you need multiple counters for identical code blocks, you can use the `id` attribute to set your own identifier to prevent collisions. The `id` attribute can also be used to connect two counters with different contents that wouldn’t normally be connected.
Example: `id="article_sidebar_stripes"` Default: `undefined`

**start**
The value the counter starts from. This allows resuming a previous counter, or just to add padding.
Example: `start="25"` Default: `"0"`

**reset**
If set to `1`, resets the current counter back to the starting value set with `start`.
Example: `reset="1"` Default: `"0"`

Toolshed notice
---------------

[](#toolshed-notice)

This is a toolshed project. Experimental and not part of the main supported product line of Rah. Not yet at least. Please use at your own risk.

Examples
--------

[](#examples)

### Striped article list

[](#striped-article-list)

Adds even and odd classes to posts.

```

```

### Return current counter value

[](#return-current-counter-value)

Display article number.

```

    #:

```

Changelog
---------

[](#changelog)

### Version 0.3.0 – 2014/03/18

[](#version-030--20140318)

- Fixed: Prevent possible collisions within the step, contained statement and of when calculating identifier.
- Added: If used as a self-closing tag, returns the current counter value.
- Now requires PHP 5.2.0 or newer.

### Version 0.2.2 – 2013/05/05

[](#version-022--20130505)

- Fixed: Reported version number.

### Version 0.2.1 – 2013/05/05

[](#version-021--20130505)

- Fixed: Composer package requirements.

### Version 0.2.0 – 2013/05/05

[](#version-020--20130505)

- Added: `` support.
- Added: `id` attribute. Allows avoiding collisions and starting new counters, where the contents and the attributes are the identical, but the counter should restart from zero. Can also be used to connect counters that wouldn’t normally match.
- Added: `start` attribute. Allows changing the counter’s starting value.
- Added: `reset` attribute. Resets the counter back to zero.

### Version 0.1.0 – 2004/08/26

[](#version-010---20040826)

- Initial release.

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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 ~105 days

Total

4

Last Release

4487d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a34b4e1b662cd2c926e8e89a76f93df266b199fe61508d38026cb952f28e59e?d=identicon)[rah](/maintainers/rah)

---

Tags

textpattern

### Embed Badge

![Health badge](/badges/rah-zem-nth/health.svg)

```
[![Health](https://phpackages.com/badges/rah-zem-nth/health.svg)](https://phpackages.com/packages/rah-zem-nth)
```

PHPackages © 2026

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