Permalinks

Overview

Permalinks are the URL's which looks more friendly to the user and to google bots (SEO). I.e. instead of /item/The%20Shawshank%20Redemption there is /item/the-shawshank-redemption or instead /filter/tags/Science%20Fiction there is /filter/tags/science-fiction. It's looking much better, isn't it ?

If you want to have nice permalink /item/forrest-gump-1994 for items you should add permalink field to each items (in JSON) once generating application.

[
  {
    "name": "Forrest Gump",
    "permalink": "forrest-gump-1994"
  },
  {
    "name": "Matrix",
    "permalink": "matrix-1999"
  },
  {
    "name": "Fight club",
    "permalink": "fight-club-1999"
  }
]

If there is not permalink field then application uses auto-generated ID like /id/AVr3yW4-GYAT5_xti-ec

Let's imagine you create an app with such a data:

[
  {
    "name": "Forrest Gump",
    "tags": [
      "running",
      "drama",
      "comedy",
      "ping-pong",
      "romance",
      "vietnam"
    ],
    "image": "http://d11fpr4s9q1qdz.cloudfront.net/small/NyrmmxE_nlm5g.jpg",
    "permalink": "forrest-gump-1994"
  },
  {
    "name": "Matrix",
    "tags": [
      "cyberpunk",
      "science-fiction",
      "virtual reality",
      "artificial intelligence"
    ],
    "image": "http://d11fpr4s9q1qdz.cloudfront.net/small/VJ2pOxEu3gQ5g.jpg",
    "permalink": "matrix-1999"
  }
]

It will generate this:

Permalink for filter

Now you are able to filter movies by tags. After clicking See all you will go into page with list of all tags:

Category page with filters

When you click i.e. artificial intelligence it will redirect you to /filter/tags/artificial-intelligence and show:

Filter page with not activated permalinks

If you want to activate it go into admin panel /admin/collections/edit. Find slugs field in Edit collection box. Set it as "slugs": ["tags"], save it and click reindex slugs.

Now it works with URL /filter/tags/artificial-intelligence:

Filter page with activated permalinks
Was this page helpful ?