# Routing

**URL:** https://forum.ghost.org/c/help/routing/19.md?page=3

[Latest](https://forum.ghost.org/latest.md) · [Categories](https://forum.ghost.org/categories.md) · [Tags](https://forum.ghost.org/tags.md)

**Page:** 4

---

## [Routes collections file doesn't update content](https://forum.ghost.org/t/routes-collections-file-doesnt-update-content/38762)

<div class="topic-metadata">

**Author:** [@Sergei\_Lavrukhin](https://forum.ghost.org/u/Sergei_Lavrukhin)\
**Replies:** 2\
**Last updated:** [May 30, 2023, 8:44pm UTC](https://forum.ghost.org/t/routes-collections-file-doesnt-update-content/38762 "2023-05-30T20:44:03Z")

</div>

Hello. I want to set posts with tag that has slug “instruktsii” to be at separate page https://www.website.ru/instruktsii/ and won’t be at my homepage. So I set collections in routes.yaml file. collections: # Homepa…

---

## [How to create URLs that include post tag](https://forum.ghost.org/t/how-to-create-urls-that-include-post-tag/38761)

<div class="topic-metadata">

**Author:** [@enota](https://forum.ghost.org/u/enota)\
**Replies:** 2\
**Last updated:** [May 30, 2023, 12:50am UTC](https://forum.ghost.org/t/how-to-create-urls-that-include-post-tag/38761 "2023-05-30T00:50:24Z")

</div>

Hi, I’m new-ish to Ghost, and despite Googling my problem and reading up on routing, I can’t figure out what should be a pretty simple and common task, so I must be missing something. Help is appreciated. Right now, my …

---

## [Pass variables to template via routes](https://forum.ghost.org/t/pass-variables-to-template-via-routes/38550)

<div class="topic-metadata">

**Author:** [@ghostrider1](https://forum.ghost.org/u/ghostrider1)\
**Replies:** 2\
**Last updated:** [May 21, 2023, 2:49pm UTC](https://forum.ghost.org/t/pass-variables-to-template-via-routes/38550 "2023-05-21T14:49:42Z")

</div>

I have a scenario I am trying to solve with templates and routes but I am missing basic understanding and I can’t understand the documentation at Ghost Themes - Dynamic URLs & Routing I have created a custom page (templ…

---

## [Unable to get sort order to change for a collection](https://forum.ghost.org/t/unable-to-get-sort-order-to-change-for-a-collection/38163)

<div class="topic-metadata">

**Author:** [@BillV](https://forum.ghost.org/u/BillV)\
**Replies:** 1\
**Last updated:** [May 1, 2023, 2:27am UTC](https://forum.ghost.org/t/unable-to-get-sort-order-to-change-for-a-collection/38163 "2023-05-01T02:27:34Z")

</div>

I have a collection meant to be a photo portfolio, but no matter what I do, it doesn’t want to apply the ordering. My posts get ordered as they always have, despite changing the publish date of one of them to 2022. The d…

---

## [Nested hierarchical long URLs, subcategories tree routes.yaml](https://forum.ghost.org/t/nested-hierarchical-long-urls-subcategories-tree-routes-yaml/27193)

<div class="topic-metadata">

**Author:** [@tuco](https://forum.ghost.org/u/tuco)\
**Replies:** 2\
**Last updated:** [April 2, 2023, 5:00pm UTC](https://forum.ghost.org/t/nested-hierarchical-long-urls-subcategories-tree-routes-yaml/27193 "2023-04-02T17:00:05Z")

</div>

Hi, I need to migrate a Ghost 3.16.1 to old school long nested URLs with category posts and their related posts in each category. This is an attempt to document a solution for those who have also read everything touchin…

---

## [Page title in browser that shows {site title} page 1](https://forum.ghost.org/t/page-title-in-browser-that-shows-site-title-page-1/25242)

<div class="topic-metadata">

**Author:** [@rmmdebruin](https://forum.ghost.org/u/rmmdebruin)\
**Replies:** 2\
**Last updated:** [April 20, 2023, 10:56am UTC](https://forum.ghost.org/t/page-title-in-browser-that-shows-site-title-page-1/25242 "2023-04-20T10:56:02Z")

</div>

Hi all, I’m using Ghost version 4.12.2 and the Liebling theme I have configured the following in my routes.yaml file to create separate pages for posts with different tags: collections: /: permalink: /articles/{…

---

## [Using routes.yaml to filter by year](https://forum.ghost.org/t/using-routes-yaml-to-filter-by-year/37616)

<div class="topic-metadata">

**Author:** [@danh](https://forum.ghost.org/u/danh)\
**Replies:** 2\
**Last updated:** [April 6, 2023, 3:21am UTC](https://forum.ghost.org/t/using-routes-yaml-to-filter-by-year/37616 "2023-04-06T03:21:53Z")

</div>

Hi all, I’m rebuilding my Ghost + Next.js site to a pure Ghost theme. I have it set up on my current site that only posts from this year are published, and then you can “go back” to prior years with specific routes. I we…

---

## [Subdirectories for Pages (not Posts) 400 Error](https://forum.ghost.org/t/subdirectories-for-pages-not-posts-400-error/36963)

<div class="topic-metadata">

**Author:** [@Austin](https://forum.ghost.org/u/Austin)\
**Replies:** 0\
**Last updated:** [March 10, 2023, 7:16am UTC](https://forum.ghost.org/t/subdirectories-for-pages-not-posts-400-error/36963 "2023-03-10T07:16:59Z")

</div>

Guys, I have spent several hours trying to understand my ignorance. I started building a website this week for the first time. Apologies if my language is not clear/non sensical. I have reviewed the URL and dynamic rou…

---

## [How to sort tags within the link example.com/tag/nameoftag](https://forum.ghost.org/t/how-to-sort-tags-within-the-link-example-com-tag-nameoftag/36781)

<div class="topic-metadata">

**Author:** [@Antonio\_Alia](https://forum.ghost.org/u/Antonio_Alia)\
**Replies:** 0\
**Last updated:** [March 2, 2023, 1:34am UTC](https://forum.ghost.org/t/how-to-sort-tags-within-the-link-example-com-tag-nameoftag/36781 "2023-03-02T01:34:05Z")

</div>

As the title suggests, I would like to change the alphabetical order of the link that ghost created automatically for the specific tag. If I act with the routes.yaml I can sort them alphabetically but then they disappea…

---

## [Exclude a tag from showing in the main loop](https://forum.ghost.org/t/exclude-a-tag-from-showing-in-the-main-loop/36742)

<div class="topic-metadata">

**Author:** [@philops](https://forum.ghost.org/u/philops)\
**Replies:** 2\
**Last updated:** [March 1, 2023, 6:50am UTC](https://forum.ghost.org/t/exclude-a-tag-from-showing-in-the-main-loop/36742 "2023-03-01T06:50:23Z")

</div>

Hello! I want to exclude the tag ‘news’ from the main page but I want to create it’s own page with it’s own format, like a customised loop.hbs but news.hbs, then add it to the navigation https://example.com/news/ Is th…

---

## [How to access Query Params on #get helper?](https://forum.ghost.org/t/how-to-access-query-params-on-get-helper/36412)

<div class="topic-metadata">

**Author:** [@Niroshan\_Mendis](https://forum.ghost.org/u/Niroshan_Mendis)\
**Replies:** 10\
**Last updated:** [February 18, 2023, 7:22pm UTC](https://forum.ghost.org/t/how-to-access-query-params-on-get-helper/36412 "2023-02-18T19:22:53Z")

</div>

I have a URL like below, /resources/?type=case-studies I try to filter using given type value as below, {{#get "posts" filter="primary\_tag:{{@query.type}}" order="published\_at desc" as |posts|}} {{#if posts}} \<u…

---

## [Using routes.yaml to filter by post access level](https://forum.ghost.org/t/using-routes-yaml-to-filter-by-post-access-level/36389)

<div class="topic-metadata">

**Author:** [@MorganM](https://forum.ghost.org/u/MorganM)\
**Replies:** 2\
**Last updated:** [February 18, 2023, 12:13am UTC](https://forum.ghost.org/t/using-routes-yaml-to-filter-by-post-access-level/36389 "2023-02-18T00:13:00Z")

</div>

I’m trying to filter the posts on my homepage by post access level - I only want the public content to appear, not the membership content. Does anyone know the syntax for this? I’ve been guessing it might be something l…

---

## [Problem assigning a template to a channel](https://forum.ghost.org/t/problem-assigning-a-template-to-a-channel/36472)

<div class="topic-metadata">

**Author:** [@dreamburger](https://forum.ghost.org/u/dreamburger)\
**Replies:** 4\
**Last updated:** [February 17, 2023, 5:17pm UTC](https://forum.ghost.org/t/problem-assigning-a-template-to-a-channel/36472 "2023-02-17T17:17:55Z")

</div>

Hi :wave: I’ve read and followed this documentation to setup a channel on my site. Unfortunately I did not manage to assign a template to this channel. I’m using a customized version of Casper. You can access the si…

---

## [How to target a page created with collections via its slug](https://forum.ghost.org/t/how-to-target-a-page-created-with-collections-via-its-slug/36387)

<div class="topic-metadata">

**Author:** [@Stromfeldt](https://forum.ghost.org/u/Stromfeldt)\
**Replies:** 2\
**Last updated:** [February 16, 2023, 1:41am UTC](https://forum.ghost.org/t/how-to-target-a-page-created-with-collections-via-its-slug/36387 "2023-02-16T01:41:47Z")

</div>

I’ve got a page, /external, that I’ve created with collections in the routes.yaml file: collections: /: permalink: /{slug}/ template: index filter: tags:-\[hash-external\] data: external: r…

---

## [How to access the page number in handlebar template?](https://forum.ghost.org/t/how-to-access-the-page-number-in-handlebar-template/36361)

<div class="topic-metadata">

**Author:** [@Niroshan\_Mendis](https://forum.ghost.org/u/Niroshan_Mendis)\
**Replies:** 4\
**Last updated:** [February 15, 2023, 3:12am UTC](https://forum.ghost.org/t/how-to-access-the-page-number-in-handlebar-template/36361 "2023-02-15T03:12:56Z")

</div>

I added route configuration like below, routing is work nicely. but i want to access the dynamic page number on #get helper like below, But it doesn’t work. Can anyone help me to solve this problem ?

---

## [Using routes.yaml to change sort order of tag pages (in journal theme)](https://forum.ghost.org/t/using-routes-yaml-to-change-sort-order-of-tag-pages-in-journal-theme/35330)

<div class="topic-metadata">

**Author:** [@patrickgilmour](https://forum.ghost.org/u/patrickgilmour)\
**Replies:** 13\
**Last updated:** [January 8, 2023, 1:46pm UTC](https://forum.ghost.org/t/using-routes-yaml-to-change-sort-order-of-tag-pages-in-journal-theme/35330 "2023-01-08T13:46:20Z")

</div>

Hi - I’m using the theme ‘journal 1.0.0’ with a Start Plan. Through the Labs tab in the Ghost admin, I am able to change the sort order of posts to oldest-first on the home/index page by changing the routes.yaml file to…

---

## [Change url of newsletter that goes out in email](https://forum.ghost.org/t/change-url-of-newsletter-that-goes-out-in-email/33972)

<div class="topic-metadata">

**Author:** [@amal](https://forum.ghost.org/u/amal)\
**Replies:** 3\
**Last updated:** [December 5, 2022, 5:30pm UTC](https://forum.ghost.org/t/change-url-of-newsletter-that-goes-out-in-email/33972 "2022-12-05T17:30:32Z")

</div>

I have changed my domain from blog.\<domain\_name\>.com to \<domain\_name\>.com/blog, however all my newletters are still pointing to the old one. Where should I change that to fix it?

---

## [Headline theme, channel routes not working](https://forum.ghost.org/t/headline-theme-channel-routes-not-working/34522)

<div class="topic-metadata">

**Author:** [@ghostrider1](https://forum.ghost.org/u/ghostrider1)\
**Replies:** 2\
**Last updated:** [December 4, 2022, 8:13am UTC](https://forum.ghost.org/t/headline-theme-channel-routes-not-working/34522 "2022-12-04T08:13:53Z")

</div>

Does channel routes work with the Headline theme? I have created a custom route routes: /testing/: controller: channel filter: tag:\[test1,test2\] But the route is showing all posts and not only test1 and test2 posts…

---

## [Unable to create collections, routes upload fails. Please help :)](https://forum.ghost.org/t/unable-to-create-collections-routes-upload-fails-please-help/34488)

<div class="topic-metadata">

**Author:** [@istvan](https://forum.ghost.org/u/istvan)\
**Replies:** 2\
**Last updated:** [November 29, 2022, 5:50pm UTC](https://forum.ghost.org/t/unable-to-create-collections-routes-upload-fails-please-help/34488 "2022-11-29T17:50:46Z")

</div>

Hello, I am simply trying to separate blog posts on my site into collections but having issues that I just don’t seem to be able to solve. This is my current routes file: routes: /: data: page.home template:…

---

## [Problems with Collections](https://forum.ghost.org/t/problems-with-collections/34426)

<div class="topic-metadata">

**Author:** [@chipwarren](https://forum.ghost.org/u/chipwarren)\
**Replies:** 3\
**Last updated:** [November 27, 2022, 2:16am UTC](https://forum.ghost.org/t/problems-with-collections/34426 "2022-11-27T02:16:08Z")

</div>

I thought Collections were the answer to my organizational challenges, but I just can’t get them to work. It’s odd that there is information in the Developer Docs, but then users post solutions that contradict what’s in …

---

## [Eror:404 using Page template for Custom Home Page](https://forum.ghost.org/t/eror-404-using-page-template-for-custom-home-page/10455)

<div class="topic-metadata">

**Author:** [@vamsi3001](https://forum.ghost.org/u/vamsi3001)\
**Replies:** 27\
**Last updated:** [November 26, 2022, 6:50pm UTC](https://forum.ghost.org/t/eror-404-using-page-template-for-custom-home-page/10455 "2022-11-26T18:50:15Z")

</div>

When I’m trying to use default page.hbs as template and create a home page using content from vamsithota.me/home, I’m getting a 404 error. Below is my routes.yaml config: routes: /: data: post: page.home template…

---

## [How to rename the word "tag" in URL](https://forum.ghost.org/t/how-to-rename-the-word-tag-in-url/34366)

<div class="topic-metadata">

**Author:** [@Jatin\_Keni](https://forum.ghost.org/u/Jatin_Keni)\
**Replies:** 2\
**Last updated:** [November 24, 2022, 8:36am UTC](https://forum.ghost.org/t/how-to-rename-the-word-tag-in-url/34366 "2022-11-24T08:36:37Z")

</div>

Hello, Is there any way to rename the word “tag” in the URL. For example one of my current URL is https://blog.reunionhq.in/tag/news/ and I want to rename the word tag with page. So the final URL would be https://blog…

---

## [How to add links to table of contents?](https://forum.ghost.org/t/how-to-add-links-to-table-of-contents/34315)

<div class="topic-metadata">

**Author:** [@aditodkar](https://forum.ghost.org/u/aditodkar)\
**Replies:** 2\
**Last updated:** [November 23, 2022, 8:50am UTC](https://forum.ghost.org/t/how-to-add-links-to-table-of-contents/34315 "2022-11-23T08:50:09Z")

</div>

I have added table of contents at the start of the blog. I want to navigate user to particular content i.e when user clicks on 2nd point or 4th point from table of contents. Can this be done in ghost blog? Any suggestion…

---

## [Dynamic special page link for all posts with tag](https://forum.ghost.org/t/dynamic-special-page-link-for-all-posts-with-tag/34218)

<div class="topic-metadata">

**Author:** [@TeslaCuil](https://forum.ghost.org/u/TeslaCuil)\
**Replies:** 0\
**Last updated:** [November 16, 2022, 5:24pm UTC](https://forum.ghost.org/t/dynamic-special-page-link-for-all-posts-with-tag/34218 "2022-11-16T17:24:39Z")

</div>

I am trying to create a series of pages, where each page has a set of posts with a specific tag, but with a different sort order from other posts. until now, I have been using channels, and creating a new channel route …

---

## [How to set optional data page to route file?](https://forum.ghost.org/t/how-to-set-optional-data-page-to-route-file/31710)

<div class="topic-metadata">

**Author:** [@Niroshan\_Mendis](https://forum.ghost.org/u/Niroshan_Mendis)\
**Replies:** 4\
**Last updated:** [October 27, 2022, 1:23pm UTC](https://forum.ghost.org/t/how-to-set-optional-data-page-to-route-file/31710 "2022-10-27T13:23:53Z")

</div>

I created my routes.yaml as below, routes: /about/: template: about data: page.about-page It works fine when exists a page in the database which has slug is ‘about-page’. But i want to know, how to set data p…

---

## [Pagination not working with Channel](https://forum.ghost.org/t/pagination-not-working-with-channel/33495)

<div class="topic-metadata">

**Author:** [@xestnic](https://forum.ghost.org/u/xestnic)\
**Replies:** 5\
**Last updated:** [October 18, 2022, 1:47pm UTC](https://forum.ghost.org/t/pagination-not-working-with-channel/33495 "2022-10-18T13:47:16Z")

</div>

Hello everyone, My use-case is pretty simple but I can’t seem to get it to work: I have a home-screen with a list of all posts (default Ghost conf) and I want to add a page that will only list posts with the primary\_ta…

---

## [How do I add the year of publication before the slug in the post URL](https://forum.ghost.org/t/how-do-i-add-the-year-of-publication-before-the-slug-in-the-post-url/33406)

<div class="topic-metadata">

**Author:** [@Jay](https://forum.ghost.org/u/Jay)\
**Replies:** 1\
**Last updated:** [October 12, 2022, 3:39pm UTC](https://forum.ghost.org/t/how-do-i-add-the-year-of-publication-before-the-slug-in-the-post-url/33406 "2022-10-12T15:39:25Z")

</div>

Hi, Sorry if this has been asked before, I did search before posting my quetion, but either I am not using the right wording, or the question has not been asked. I have created a colelction to house all my news articl…

---

## [Post ordering at tags pages](https://forum.ghost.org/t/post-ordering-at-tags-pages/15054)

<div class="topic-metadata">

**Author:** [@ryukano](https://forum.ghost.org/u/ryukano)\
**Replies:** 2\
**Last updated:** [October 5, 2022, 7:54pm UTC](https://forum.ghost.org/t/post-ordering-at-tags-pages/15054 "2022-10-05T19:54:23Z")

</div>

Hello! I have several pages where posts are displayed by tags. For example: mysite.com/tag/{tagname}/ and there are posts that have relevant tag. On this pages I trying to make posts ordering by date: oldest post shoul…

---

## [Set page(or post) as homepage](https://forum.ghost.org/t/set-page-or-post-as-homepage/17482)

<div class="topic-metadata">

**Author:** [@chocosobo](https://forum.ghost.org/u/chocosobo)\
**Replies:** 9\
**Last updated:** [October 5, 2022, 1:59pm UTC](https://forum.ghost.org/t/set-page-or-post-as-homepage/17482 "2022-10-05T13:59:07Z")

</div>

i trying to set a page as homepage i read some route things and handlebars theme docs but i cant still understand well most of guides and docs are about filtering and somethings but i want show contents inside of page…

---

## [Custom json-ld in blog](https://forum.ghost.org/t/custom-json-ld-in-blog/33090)

<div class="topic-metadata">

**Author:** [@Nikita\_Vasylinenko](https://forum.ghost.org/u/Nikita_Vasylinenko)\
**Replies:** 0\
**Last updated:** [September 28, 2022, 1:06pm UTC](https://forum.ghost.org/t/custom-json-ld-in-blog/33090 "2022-09-28T13:06:50Z")

</div>

I have a blog & I want to add some custom json-ld for better SEO. For example, for now, I have such microdata as on screenshot, but I want to add some fields like jobTitle, position, etc. Is it possible?

[Previous page](https://forum.ghost.org/c/help/routing/19.md?page=2)

[Next page](https://forum.ghost.org/c/help/routing/19.md?page=4)
