I created a module (more like just a content-type) which is actually a copy of blog.module. My reason is, so that pathauto.module will automatically generate alias of content-types for users.
e.g.:
http://username.mysite.com/video
http://username.mysite.com/photo

With only Views, I can't get the path since there's no way I am able to place an argument as the first path. I'd tried working this with RewriteRule, domain.module, and none works as what I want.

My question is, how can I override some functions in pathauto.module? I wouldn't want to just hack the module and make a mess out of it, then get screwed up when I update the module. In other words, I prefer doing the Drupal way.

Anyone care to guide? Cheers!

Comments

greggles’s picture

Do you want to define aliases at "video" that actually point to something internally like "node/125" or do you want a menu element at "video" that accepts arguments the same way that the "blog" element at example.com/blog is a menu entry that can take a UID and return blog posts for that uid?

sadist’s picture

greggles, thanks!

yes, it's the latter one that i'm looking for. i have no problem with setting up path for nodes. but i want the same way like 'blog' to list down all posts of that particular node-types for the uid.

greggles’s picture

Status: Active » Fixed

You don't want path aliases, you want a menu callback - http://api.drupal.org/api/function/hook_menu

dave reid’s picture

Better yet, SimpleViews is great for that purpose.

sadist’s picture

Dave, SimpleViews will provide me if I want my path to be like 'video/username' but what I want is to be 'username/video' and it will list down all that user's videos.

johngriffin’s picture

I'm not sure if simpleviews is fit for purpose here. I think the most flexible way would be to create a menu callback using hook_menu. However if you're not really a coder then the awesome Panels module could also do this by setting the path to %user/video.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.