Reputation: 7487
I am a newbie to drupal, and have used cakephp and codeigniter frameworks earlier. Both of them are MVC based, I am not a 100% sure if Drupal 6 is MVC based, though is has separate layers of code. So in codeigniter a url such as /users/show/1 would be interpreted as it would be in class "users", and the method would "show" and the id of the user would be "1". Can we interpret a drupal URL in this way??
Also I know drupal uses a good bit of path alias, so would that affect in a big way?? So if we have a url that says domain/admin/xyz?u=1(example url), where in admin module can I find this??
Upvotes: 1
Views: 99
Reputation: 36956
The short answer is no, you can't interpret a Drupal URL in the way you suggest. Drupal is not MVC and URLs do not conform to any such pattern. Any module can define any path it wants for it's pages, and those paths can again be overridden using alises (as you suggest in your question).
There's very, very little OOP used in Drupal 6 and off the top of my head I can't think of any core modules that declare any classes whatsoever (let alone declare them using MVC style conventions). This has changed a fair bit in Drupal 7, but it's still does not use an MVC approach.
I'm afraid you'll be reduced to searching core modules' hook_menu()
implementations to see what page callback
function is used for a particular path. And even then if you've got aliases turned on you probably won't find it.
As a little tip, the router path ('true' path) of a Drupal page can always be found in $_GET['q']
.
Upvotes: 2