Ghost/core/server/helpers/page_url.js
Hannah Wolfe a98efe1b68 🔥 Remove deprecated pageUrl helper (#7509)
closes #2217

- This helper has been deprecated in favour of `page_url` for more than 2 years!!!
- Ghost 1.0.0 is the end of all of this 💩
2016-10-06 20:47:37 +02:00

23 lines
534 B
JavaScript

// ### Page URL Helper
//
// *Usage example:*
// `{{page_url 2}}`
//
// Returns the URL for the page specified in the current object
// context.
//
// We use the name page_url to match the helper for consistency:
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
var getPaginatedUrl = require('../data/meta/paginated_url'),
page_url;
page_url = function (page, options) {
if (!options) {
options = page;
page = 1;
}
return getPaginatedUrl(page, options.data.root);
};
module.exports = page_url;