{"category":{"version":"58810495d172b61b00d73859","project":"542fe92a5eceb608003fddc8","_id":"58810495d172b61b00d7385b","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-13T19:08:44.260Z","from_sync":false,"order":1,"slug":"context-reference","title":"Context Reference"},"parentDoc":null,"project":"542fe92a5eceb608003fddc8","user":"542c5cfcddd3190e00228849","version":{"__v":1,"_id":"58810495d172b61b00d73859","project":"542fe92a5eceb608003fddc8","createdAt":"2017-01-19T18:25:25.206Z","releaseDate":"2017-01-19T18:25:25.206Z","categories":["58810495d172b61b00d7385a","58810495d172b61b00d7385b","58810495d172b61b00d7385c","58810495d172b61b00d7385d","58810495d172b61b00d7385e","58810495d172b61b00d7385f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"0.11.4","version":"0.11.4"},"_id":"58810495d172b61b00d73867","__v":0,"updates":["5666a02e7cc81e0d00253f8f"],"next":{"pages":[],"description":""},"createdAt":"2015-05-13T20:17:25.397Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":14,"body":"Use `{{#is \"paged\"}}{{/is}}` to detect this context.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Context\",\n    \"h-1\": \"Url\",\n    \"h-2\": \"Template\",\n    \"h-3\": \"Data\",\n    \"h-4\": \"Body Classes\",\n    \"0-0\": \"[index](doc:index-context), paged\",\n    \"0-1\": \"/page/2/\",\n    \"0-2\": \"index.hbs, tag.hbs, author.hbs\",\n    \"0-3\": \"[{post}], {pagination}\",\n    \"0-4\": \".paged\"\n  },\n  \"cols\": 5,\n  \"rows\": 1\n}\n[/block]\n## Description\n\nThe `paged` context is set in addition to other contexts whenever you're on the 2nd, 3rd, etc pages of a post list. It is set for the index, tag and author post lists. It is never set on the first page.\n\n## Routes\n\nThe `paged` context is set whenever there is a `page/:num/` part to the route, E.g. on `/page/2/` or `/tag/:slug/page/2/` or `/author/:slug/page/2/`. The structure of paginated URLs cannot be customised at present.\n\n## Templates\n\nThere are no specific templates for the `paged` context. The `index.hbs`, `tag.hbs` or `author.hbs` template will be used depending on what other context is present.\n\n## Data\n\nWhenever you're in a `paged` context, you will have access to an array of [post objects](/docs/post-context#post-object-attributes) and a [pagination object](/docs/pagination#pagination-attributes). \n\n## Example Code\n\nThe `paged` context is most useful when detecting contexts using the `{{#is}}` helper.\n\nFor example:\n\n`{{#is \"tag\"}}...{{/is}}` will be true when on either the first or any subsequent page of a tag based post list. \n\n`{{#is \"tag, paged\"}}...{{/is}}` will be true only on subsequent pages of the post list, not on the first.\n\nAnd if you want to detect the first tag page, you can nest and negate the is helper like this:\n\n`{{#is \"tag\"}}{{^is \"paged\"}}...template here...{{/is}}{{/is}}`\n\nNote: there'll probably be simpler ways to do this in future, but this does work :)","excerpt":"The `paged` context","slug":"paged-context","type":"basic","title":"paged"}

paged

The `paged` context

Use `{{#is "paged"}}{{/is}}` to detect this context. [block:parameters] { "data": { "h-0": "Context", "h-1": "Url", "h-2": "Template", "h-3": "Data", "h-4": "Body Classes", "0-0": "[index](doc:index-context), paged", "0-1": "/page/2/", "0-2": "index.hbs, tag.hbs, author.hbs", "0-3": "[{post}], {pagination}", "0-4": ".paged" }, "cols": 5, "rows": 1 } [/block] ## Description The `paged` context is set in addition to other contexts whenever you're on the 2nd, 3rd, etc pages of a post list. It is set for the index, tag and author post lists. It is never set on the first page. ## Routes The `paged` context is set whenever there is a `page/:num/` part to the route, E.g. on `/page/2/` or `/tag/:slug/page/2/` or `/author/:slug/page/2/`. The structure of paginated URLs cannot be customised at present. ## Templates There are no specific templates for the `paged` context. The `index.hbs`, `tag.hbs` or `author.hbs` template will be used depending on what other context is present. ## Data Whenever you're in a `paged` context, you will have access to an array of [post objects](/docs/post-context#post-object-attributes) and a [pagination object](/docs/pagination#pagination-attributes). ## Example Code The `paged` context is most useful when detecting contexts using the `{{#is}}` helper. For example: `{{#is "tag"}}...{{/is}}` will be true when on either the first or any subsequent page of a tag based post list. `{{#is "tag, paged"}}...{{/is}}` will be true only on subsequent pages of the post list, not on the first. And if you want to detect the first tag page, you can nest and negate the is helper like this: `{{#is "tag"}}{{^is "paged"}}...template here...{{/is}}{{/is}}` Note: there'll probably be simpler ways to do this in future, but this does work :)