1

I need to create a Tour guide for the generic elements in a page like Search bar, notification, sidebar. These elements appear on all the pages. I want to create a tour which is available on all the pages. The tour is being created using Tour UI module. Is there a way to create a Tour for all the routes available. Most of the pages are Landing page nodes and few view pages.

2

Since you're using the Tour UI module, add the routes to the list

All node pages have the same route, entity.node.canonical

For view pages, they are unique. You can use Devel's Webprofiler module to see the route names, ex:

enter image description here

They are basically structured as view.[view_name].[display_id]

Note: display_id is also known as the machine name value.


Is there a possibility to have wildcards in the routes? Chances are thin

There isn't. You would have to tinker with the Tour UI module's code.

Also, is there a way to enable tour for a specific node?

There isn't. You'll prob have to use one of the hooks shown in tour_test.module to unset if the entity/node id is not the one you want.


Because of the routing limitation, seems to me like the core tour module was built towards showing how to edit or configure pages for administrators and not catered towards anonymous users. For your use case, you're better off using

D8: Bootstrap Tour module which is using the bootstrap tour library

No need to be familiar with Drupal routing names to be able to assign a tip to a page, this modules works purely on jQuery selectors so you may add the page body class plus some jQuery selectors to target a specific page instead of routing name.

| improve this answer | |
  • 1
    Thanks @No Sssweat for the reply. Is there a possibility to have wildcards in the routes? Chances are thin – Malabya Tewari Aug 21 at 5:55
  • Also, is there a way to enable tour for a specific node? – Malabya Tewari Aug 21 at 6:02
  • @MalabyaTewari see updated answer. – No Sssweat Aug 21 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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