{"id":21840174,"url":"https://github.com/gocom/zem_nth","last_synced_at":"2026-05-11T16:11:45.669Z","repository":{"id":8229525,"uuid":"9669931","full_name":"gocom/zem_nth","owner":"gocom","description":"Fork of zem_nth plugin","archived":false,"fork":false,"pushed_at":"2014-03-18T14:00:06.000Z","size":288,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-26T11:08:22.044Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gocom.png","metadata":{"files":{"readme":"README.textile","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-25T11:06:40.000Z","updated_at":"2014-03-18T14:00:07.000Z","dependencies_parsed_at":"2022-08-06T23:00:32.838Z","dependency_job_id":null,"html_url":"https://github.com/gocom/zem_nth","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocom%2Fzem_nth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocom%2Fzem_nth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocom%2Fzem_nth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocom%2Fzem_nth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gocom","download_url":"https://codeload.github.com/gocom/zem_nth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244822859,"owners_count":20516179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-27T21:24:54.831Z","updated_at":"2026-05-11T16:11:45.636Z","avatar_url":"https://github.com/gocom.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"h1. zem_nth\n\n\"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\n\nStep 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.\n\nh2. Installing\n\nUsing \"Composer\":http://getcomposer.org:\n\nbc. $ composer require rah/zem_nth:*\n\nOr \"download\":https://github.com/gocom/zem_nth/releases a plugin package.\n\nh2. Tag attributes\n\nbc. \u003ctxp:zem_nth step=\"1\" of=\"3\"\u003e\n\t...every third...\n\u003ctxp:else /\u003e\n\t...first and second...\n\u003c/txp:zem_nth\u003e\n\nThe tag can also be used as a single, self-closing tag to return the current counter value:\n\nbc. \u003ctxp:zem_nth id=\"counter-identifier\" /\u003e\n\nAttributes are as follows:\n\n*step*\nThe step to jump.\nExample: @step=\"2\"@ Default: @\"2\"@\n\n*of*\nStep of how many.\nExample: @off=\"4\"@ Default: @undefined@\n\n*id*\nThe 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.\nExample: @id=\"article_sidebar_stripes\"@ Default: @undefined@\n\n*start*\nThe value the counter starts from. This allows resuming a previous counter, or just to add padding.\nExample: @start=\"25\"@ Default: @\"0\"@\n\n*reset*\nIf set to @1@, resets the current counter back to the starting value set with @start@.\nExample: @reset=\"1\"@ Default: @\"0\"@\n\nh2. Toolshed notice\n\nThis 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.\n\nh2. Examples\n\nh3. Striped article list\n\nAdds even and odd classes to posts.\n\nbc. \u003ctxp:article_custom\u003e\n    \u003cdiv class=\"\u003ctxp:zem_nth step=\"1\" of=\"2\"\u003eodd\u003ctxp:else /\u003eeven\u003c/txp:zem_nth\u003e\"\u003e\n        \u003ch2\u003e\u003ctxp:title /\u003e\u003c/h2\u003e\n        \u003ctxp:body /\u003e\n    \u003c/div\u003e\n\u003c/txp:article_custom\u003e\n\nh3. Return current counter value\n\nDisplay article number.\n\nbc. \u003ctxp:article_custom\u003e\n    \u003ch2\u003e#\u003ctxp:zem_nth id=\"article-number\" /\u003e: \u003ctxp:title /\u003e\u003c/h2\u003e\n\u003c/txp:article_custom\u003e\n\nh2. Changelog\n\nh3. Version 0.3.0 - 2014/03/18\n\n* Fixed: Prevent possible collisions within the step, contained statement and of when calculating identifier.\n* Added: If used as a self-closing tag, returns the current counter value.\n* Now requires PHP 5.2.0 or newer.\n\nh3. Version 0.2.2 - 2013/05/05\n\n* Fixed: Reported version number.\n\nh3. Version 0.2.1 - 2013/05/05\n\n* Fixed: Composer package requirements.\n\nh3. Version 0.2.0 - 2013/05/05\n\n* Added: @\u003ctxp:else /\u003e@ support.\n* 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.\n* Added: @start@ attribute. Allows changing the counter's starting value.\n* Added: @reset@ attribute. Resets the counter back to zero.\n\nh3. Version 0.1.0  - 2004/08/26\n\n* Initial release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocom%2Fzem_nth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgocom%2Fzem_nth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocom%2Fzem_nth/lists"}