I've just been playing around with the profile module for a new site that I'm working on and discovered that the profile directory can't be pathautoed :(

My question is, if I attempt to put a patch together for this, will it be considered for integration into pathauto.module?

Comments

greggles’s picture

Can you explain what you mean? You can alias the user's profile page - e.g. user/123 to user/greggles

Do you mean example.com/profile/something ?

Please be more explicit about what this would do.

barry’s picture

Sorry about not being more specific, I was meaning the way profile module sets out urls like:

example.com/profile/
example.com/profile/profile_city
example.com/profile/profile_city/edinburgh

greggles’s picture

Ok, and how would you like those to be automatically aliased?

barry’s picture

Ideally I'd like my site to have something like -

example.com/users/profiles/
example.com/users/profiles/city/
example.com/users/profiles/city/edinburgh

I'm beginning to think this may not be as straight forward as I had thought before since profile doesn't use taxonomy and since all the fields are user created and limitless.

greggles’s picture

Well, it's not straightforward to me if it's possible, but that could be an indication that we need to add some more hooks too core.

One other thought is that a combination of user-nodes (the node for profiles solution) + cck + views could achieve this desired effect. Here is an example of that in use: http://2007.oscms-summit.org/attendees That page is actually a view of cck nodes that are tied to users. You can imagine adding attendees/cities/ as a view that accepts an argument of the city and then filters the view, right?

Let's think about this some more and think about what/how it could be implemented in current drupal core/pathauto.

barry’s picture

I've had a look at the usernode solution that you suggested and it seems a little bit overkill for what could be achieved my implementing this though pathauto. In total the usernode soultion relies upon an additional (at least) 5 modules.

I must admit though, that I'm completly stuck on a way to implement support for this in the pathauto module :(

greggles’s picture

Version: 5.x-1.x-dev » 5.x-2.x-dev
Status: Active » Postponed

Just changing status and version to reflect the current feature version and also the fact that I'm not working on this.

If someone else wants to take a run at implementing this then please do!

rnagy’s picture

Status: Closed (duplicate) » Postponed

Comment removed by contributor

greggles’s picture

@rnagy - thanks for the ideas. In general it's best to post your code as an attachment in the diff format (see http://drupal.org/patch/create for details on the standard format for diffs in the drupal issue queue).

The problem with this implementation is:

1) that it's in profile.module (it should be in the pathauto_user.inc file, probably) it's unlikely that core modules would get code to support a contrib module (see the specific implementations for forum and blog, for example, which could go into forum.module or blog.module but don't)
2) it's very specific to your site and your configuration. Before we include this into pathauto we would want to completely abstract it so that it would work regardless of the settings that people have in their profile system. It should respond automatically to new fields rather than needing more code for each additional field that is added in profile.

Again - thanks for your first attempt. This may show us the way.

Lausch’s picture

hi guys,

is there a way to use the same code for userpath?

greets

Lausch

OutCast’s picture

edit never mind just had to read a little more :)

greggles’s picture

Status: Postponed » Closed (duplicate)

For 5.x-2.x this is a duplicate of #125640: Profile tokens

Status: Postponed » Closed (duplicate)