0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/test/unit/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
..
asset_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
author_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
body_class_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
content_spec.js Update downsize node module. Small test updates. 2014-11-30 20:49:36 -08:00
date_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
encode_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
excerpt_spec.js Test update to handle downsize improvements 2014-12-14 23:37:00 +00:00
foreach_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
ghost_foot_spec.js Code Injection - adds perms, shortcuts, icon, flag 2014-12-04 13:34:44 +00:00
ghost_head_spec.js Code Injection - adds perms, shortcuts, icon, flag 2014-12-04 13:34:44 +00:00
ghost_script_tags_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
has_spec.js Fix has helper tag matching 2015-01-09 21:52:23 +00:00
image_spec.js Change url and image into synchronous helpers 2014-12-29 18:44:15 +00:00
is_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
meta_description_spec.js Updated meta helpers to use tag meta data if present 2014-12-21 11:39:49 +00:00
meta_title_spec.js Updated meta helpers to use tag meta data if present 2014-12-21 11:39:49 +00:00
navigation_spec.js Add {{navigation}} helper 2015-02-13 08:38:18 -08:00
page_url_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
pagination_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
plural_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
post_class_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
tags_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
title_spec.js Refactor helpers & tests into individual files 2014-10-14 22:52:40 +02:00
url_spec.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