Ghost/core/server/helpers
Marcos Ojeda d28ffef3e9 Add {{navigation}} helper
closes #4541
creates a handlebars helper with behavior matching the spec in #4541 and
updates `frontend.js` to include the navigation data in the rendered page
context.
- checks for {{current}} against `relativeUrl`
- adds helper `getSiteNavigation()` which returns contents of
  `api.settings.read('navigation')`, or an empty list
- navigation helper is responsible for filtering and consistently formatting
  navigation data from settings.
- changes `frontend.js`'s `formatResponse` & `formatPageResponse` to return
  a promise with page data and updates frontend controllers to use it.
- `formatPageResponse` now includes a third parameter to allow values to be
  merged into the page response (rather than using `_.extend` in the
  render methods directly.
- {{navigation}} will render an empty `ul` if no navigation items exist
- incorporates {{url}}/urlFor behavior for nav contexts. (see #4862)
- uses {{url absolute="true"}} in default nav template
2015-02-13 08:38:18 -08:00
..
tpl Add {{navigation}} helper 2015-02-13 08:38:18 -08:00
asset.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
author.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
body_class.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
content.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
date.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
encode.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
excerpt.js Update excerpt helper to properly filter HTML footnotes 2015-01-01 06:45:06 +01:00
foreach.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
ghost_foot.js Match labels with element ids. 2014-12-04 15:21:27 +00:00
ghost_head.js Match labels with element ids. 2014-12-04 15:21:27 +00:00
ghost_script_tags.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
has.js Fix has helper tag matching 2015-01-09 21:52:23 +00:00
image.js Change url and image into synchronous helpers 2014-12-29 18:44:15 +00:00
index.js Add {{navigation}} helper 2015-02-13 08:38:18 -08:00
is.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
meta_description.js Updated meta helpers to use tag meta data if present 2014-12-21 11:39:49 +00:00
meta_title.js Updated meta helpers to use tag meta data if present 2014-12-21 11:39:49 +00:00
navigation.js Add {{navigation}} helper 2015-02-13 08:38:18 -08:00
page_url.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
pagination.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
plural.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
post_class.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
tags.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
template.js Add jscs task to grunt file and clean up files to adhere to jscs rules. 2014-09-17 21:44:29 -04:00
title.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
url.js Update urlFor to handle 'nav' contexts 2015-01-31 09:29:53 -08:00
utils.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00