With both views and panels (via the page manager), you can create a page that accepts arguments like users/%/points.
However, I don’t need any of the other functionality of these modules beyond the creation of that dynamic page URL. I simply want to create a page that will appear when someone is at the url users/%/points. How can I set up a URL like that without using a module like Views or Panels?
Drupal has a system to create dynamic pages, this is what happens when you view a node or a user. You got a few options, but it all happens in hook_menu.
In the first example, you utilize Drupal’s load system. Drupal will call user_load on the argument index at 1, if it finds a user, that will be available instead of the actual argument (the user id). If no user is found 404 will be returned.
In the second example, any argument is allowed, which means that you would get a page if you tried to access
user/my-little-pony/points.In the third example is used to show that Drupal allow additional args. So if you want to access
user/points/pony, you would get theuser/pointspage with additional args which could be used, if your callback function allows it.Remember to set some sort of access control as well. You can define custom functions to determine if the user should have access, you use the drupal menu system and require permissions, like
access content.Ready made code:
This would need to go into example.module and you would need to create an example.info file. You could change example into whatever module you have created.