im using panels to create custom page to show in user/%user the profiles original page are create with Content Profile
module so profile are nodes. the problem is i get duplicate user pages a orginal with a path like domain/node/username and one with panels domain/username i can override this problem if all the links to user will go to panels page, the problem is views list with user link to node and taxonomies list with user name links to node to. How can i change this links to go to panels user?

Comments

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

I have no idea what you're talking about.

tryitonce’s picture

Well, may be I am now looking for the same thing andd will try to explain it here:

1. The user fills in his/her details via Content Profile / CCK and a node is created, i.e. - www.example.com/users/user-profile-262.
2. Panels creates and replaces this with www.example.com//users/john-doe.
3. I now create a directory of members with Views.
4. I link the name of the user from a CCK field (say Surname / Family name) to its node - option in Views "Link this field to its node".
5. When I now look at the members directory and click on the surnames then I will be sent to www.example.com/users/user-profile-262.
However, I want to go to www.example.com/users/john-doe.

I guess this is done with some tricks - I looked at the option (Views) of "Output this field as a link" - but this only offers part of the user name I might be using to include token like in the link.

(I guess we need to use the users name somehow - well I will explore this a bit now ....)

So, I hope this is what koffer is after and may be merlinofchaos you have a useful hint how to do this.

Thanks ...

tryitonce’s picture

Well,

first test report on a way to a possible to solution and a little more background:

My directory of members is a table view:

Surname -- First Name -- Initial Middle Name -- City -- etc.

The Surname and City, etc. are sortable.

The member / user John Doe would appear in the table above as: Doe -- John, so sorting by Surname makes sense.
Sorting by user name John Doe does not make sense (in my naming system of user names and collected CCK fields).

Now, in Views I can add the user field [Name] and link it to "Link this field to its user". When I add this to my table I can use this as a link to theUser Profile I want to get www.example.com/users/john-doe. So, this is a solution, but it adds a field I don't really want s may users register under their real name. This way I end up with the user name in my table twice in different formats.

For sites where user names might be different from the registration names this is a sensible solution.

So, is there a solution to use the User Name [Name] as a link for my Surname field in my table? Or in a different way explained - to link form the Surname to www.example.com/users/john-doe?

In Views I tried to use the token option by placing User Name in front of Surname with the option of "Exclude from display".
When I now edit the field Surname in Views and specify "Output this field as a link" using "users/[name]" - I only get the path www.example.com/users/John Doe. Well, it is obvious and logical - but gives a 404 error of course.

For now I guess I will use the solution of including the User name as well and make this the link at the end of the table view of the members - while the others will used for sorting the table.

May be I haven't cracked the Content Profile input as I still have the Account and the User Profile in different tabs - would be much nicer to have them together and derive all the account information from the User Profile.

May be there is another way and someone has the right trick up their sleeves. Well - thanks for anyone looking at this and thinking about a solution ....

esmerel’s picture

Status: Postponed (maintainer needs more info) » Active
merlinofchaos’s picture

Status: Active » Fixed

In Views, instead of using "Link this field to its node", uncheck that. Rewrite the field into a link. Make the destination of the link user/[uid].

In order for that [uid] to work, you need to make sure that the user: uid field is there, that it is *before* the CCK field. You should probably check exclude. Make sure [uid] is the actual token it uses.

The link 'user/[uid]' will automatically be rewritten by Drupal to the proper alias. Note that none of these things are actually Panels related. =)

tryitonce’s picture

Thanksssssssss!

reinascr’s picture

Component: Code » Plugins - content types
Assigned: Unassigned » reinascr
Category: support » bug
Status: Fixed » Needs review
merlinofchaos’s picture

Component: Plugins - content types » Code
Assigned: reinascr » Unassigned
Category: bug » support
Status: Needs review » Fixed

Resetting stats. No idea why #7 randomly changed a bunch of stuff.

Status: Fixed » Closed (fixed)

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

chien_fu’s picture

Status: Closed (fixed) » Active

Well that's all well and good, and works if there is only one item in the field, but if I call my "field_students" field, and it has 30 students listed, each with their own node, and I rewrite the field into a link, it creates one big hyperlink out of the entire student list that points to the node of the first student listed.

I hope that makes sense... So my question is:
How can I change the link of each individual node referenced by this field? Instead of "link this field to its node" I want to "Link this field to a panel page and send arguments"

*******NEVERMIND......... I was wrong. I tried "Output this field as a link" which made it all one link, but if you rewrite the output of the field and use the replacement patterns you're good.. don't mind me :)

chien_fu’s picture

Status: Active » Closed (fixed)