0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/controllers/frontend
Hannah Wolfe 17499dbc7b Generate context from channelConfig, not URL
refs #5091

- makes post context explicit - data.post must be set, rather than post being the default
- uses channelConfig to determine the context for a channel (the channel name) rather than basing it off of the URL
- updates tests to setup the contexts more clearly, the outcome has not changed

Since #6469 req has channelConfig attached to it.
We can use req.channelConfig to determine what the context should be for a channel (the channel name)
This allows us to remove the hardcoded URLs, and means that custom channels will automatically get their own context.
Coupled with removing 'post' from being a default/fallthrough, to being explicitly set, this will reduce
potential context errors, as we start to extend the frontend capabilities
2016-03-20 12:59:25 +00:00
..
channel-config.js Make frontend routing dynamic & driven by channels 2016-02-15 15:57:20 +00:00
channels.js Make frontend routing dynamic & driven by channels 2016-02-15 15:57:20 +00:00
context.js Generate context from channelConfig, not URL 2016-03-20 12:59:25 +00:00
error.js
fetch-data.js Don't include app fields 2016-02-11 15:03:33 +00:00
format-response.js Switch frontend controller to use new filter param 2015-10-26 09:40:19 +00:00
index.js Merge pull request #6469 from ErisDS/dynamic-channel-routing 2016-02-15 19:27:41 +01:00
render-channel.js Make frontend routing dynamic & driven by channels 2016-02-15 15:57:20 +00:00
secure.js
templates.js Unify code for picking a template to render with 2015-12-01 12:05:46 +08:00