I would like to set up Panels page URL with this pattern: my-site/[node:nid]/[node:title] (i.e. my-site/34/node-34-title).

I don't exactly understand how the Panels page URL setting works with arguments. I can set up the path to my-site/%nid/%title but how can I set it up so that %nid = [node:nid] and %title = [node:title]?

My questions:

  1. How do I configure Panels page to do that?
  2. Panels panes are populated with Views field. Is there anything to do in views to get these arguments?
  3. How can I get transliterated node titles, using Pathauto or Transliterate?


1 Answer 1


Don't try to change the url with panel page manager:

The path pattern is a way to target some page by there route.

1 - If you want to modify the url pattern, use instead the Pathauto pattern tool with Token. ex: /[node:title].

Once you build your pattern, it will create some alias every time you create a node, but the internal url is still /node/%node, so you have to use this one to target the nodes pages in the panel configuration.

2- Then, if you need to use the node title in a panel region, you can create a block view with title, and add a the contextual filter on the ID field, by taking is value frome the url. https://duckduckgo.com/?q=drupal+8+add+contextual+filter&ia=web

3- If you build a pattern like in 1 - with pathauto and token - the resulting alias will be a transliteration of the node title.

  • I first built a pathauto alias pattern like that /[node:nid] and use the /node/%node in Panels. Everything works fine, thank you. I guess that it will also work if my pathauto pattern alias is /[node:nid]/[node:title]. Commented Mar 16, 2017 at 14:33
  • Pathauto is even more powerful : you can juste set: /[node:title]. It's not using the id to find the node but it save the url and associate it with the internal path /node/[id]. Don't forgot to validate my answer above :p.
    – Cawet
    Commented Mar 17, 2017 at 8:24
  • You're right. After tested several patterns in Pathauto URL aliases, I understood that whatever you set it will be used in Panels /%node URL. In fact the node ID is always used by the system. Powerfull !!! Thanks for your help. Commented Mar 19, 2017 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.