Score:0

Where can i find the path/URL of a module after installing it?

ge flag

I just installed two modules on a Drupal 9 site: https://www.drupal.org/project/simple_forum and https://www.drupal.org/project/answers.

I want to get the URL where all posts/questions are listed and use it in a menu, but I cannot find where those are. The only thing I found is the URL for creating new posts and questions.

Score:3
de flag

You can look at the routing file for modules to determine the paths the module declares. In your case you will look at simple_forum.routing.yml and project_answers.routing.yml. Look at the path key for the various entries.

Ivan Leon Yam avatar
ge flag
it is quite interesting, the first path returns an empty array, and the second one return a list of ratings, there is no path that returns something like a list of topics, i mean a list like the main page list of stack overflow. Maybe... do i have to code something?. this is the route file of simple forum: https://git.drupalcode.org/project/simple_forum/-/blob/8.x-1.2/simple_forum.routing.yml
Jaypan avatar
de flag
The README may give more details https://git.drupalcode.org/project/simple_forum/-/blob/8.x-1.2/README.txt
Ivan Leon Yam avatar
ge flag
Yea i already read that, it doesnt say anything about a list of topics, it only describes how to create a new topic. also the answers module doesnt say anything about that. but there are screenshots with this list of topics: https://www.drupal.org/project/answers
Jaypan avatar
de flag
You may need to create your own list with the Views module that ships with core.
Score:1
cn flag

Instead of looking for the routes individually module by module, you can install the Devel module temporarily in your local environment (never use on a production server) and go to /devel/routes to get a list of all routes currently active for the site.

Score:1
ua flag

I want to get the URL where all posts/questions are listed and use it in a menu

To answer your question, for those 2 specific modules, there simply isn't one. Those 2 modules do not provide any.

You can always use Views to create a page view and add title and comment count as fields and format its display as a table.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.