URL Rewriting

All app themes follow the same URL rewriting scheme. Links for categories, posts and pages are composed as follows:

Categories

Route Description
#category/:slug/:id
    Displays a list or carousel of articles / posts from the category.

  • slug – The slug of the category (“name_slug” value from the exportcategories
    endpoint).
  • id – The id of the category (“id” value from the exportcategories
    endpoint).

Articles / posts

All routes from the following table are equivalent and will display a post’s details page.

Route Description
#category/:category_id/
article/:article_id
Displays a post’s details page. Used when navigating through a list of posts from a category and opening the post’s details page.

  • category_id – The id of the category (“id” value from the exportcategories
    endpoint).
  • article_id – The id of the article / post (see the post
    format
    ).
#category/:slug/
article/:article_id
Displays a post’s details page. Used when navigating through a list of posts from a category and opening the post’s details page.

  • slug – The name slug of the category (“name_slug” value from the exportcategories
    endpoint).
  • article_id – The id of the article / post (see the post
    format
    ).
#article/:article_id Displays a post’s details page. Used when redirecting to the mobile application from the original desktop link.

  • article_id – The id of the article / post (see the post
    format
    ).
#articleUrl/:link (Deprecated) Displays a post’s details page. Used when redirecting to the mobile application from the original desktop link and the id of the post is not known.

  • link – The original (desktop) link of the article / post (see the post format).The “link” param is url encoded,
    ex.: http%3A%2F%2Fappticles%2Ecom%2F2016%2F01%2F09%2Fmy-sample-url%2F.

Pages

Route Description
#page/:id
    Displays a page’s contents. Used when navigating through the menu and opening a page’s details.

  • id – The id of the page (“id” value from the exportpages endpoint).

Rel=canonical

All app themes set a tag with rel=”canonical” in the <head> of the HTML page to indicate the relationship between the app’s pages and the original (desktop) content. An app page will contain a single rel=canonical tag that is set as follows:

Categories

Tag Description
<link rel=”canonical” href=”{category_link}”> Used when displaying a list of articles / posts from a category.

  • category_link – The link of the category (“link” value from the exportcategories endpoint). The tag is set only if the “link” field exists in the JSON and it is not empty.

Posts

Tag Description
<link rel=”canonical” href=”{article_link}”> Used when displaying a post’s details.

  • article_link – The link of the post (see the post format).

Pages

Tag Description
<link rel=”canonical” href=”{page_link}”> Used when displaying a page’s details.

  • page_link – The link of the page (“link” value from the exportpages endpoint).