0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/server/helpers
Marcos Ojeda 6f457768a2 Update urlFor to handle 'nav' contexts
needed for #4852
Before this, calling `{{url}}` with a nav context from #4541 would
output `/`. This adds a check in `urlFor` that looks for keys in a
nav context object, namely `slug`, `current`, `label`, & `url`.

This change allows for a url to pass through if used in a nav context.

* adds `schema.isNav()`
* adds tests to `url_spec.js`
* handles absolute urls correctly even if `absolute=true`
2015-01-31 09:29:53 -08:00
..
tpl Updated pageUrl helper to page_url 2014-02-20 15:29:14 -06: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 Change url and image into synchronous helpers 2014-12-29 18:44:15 +00: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
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