Jump to content

Recommended Posts

Posted

Okay, not sure if this is a question or a wish list item, or maybe even both!

I want to display the authors name next to an article, but of course this is just displaying the username which is not pretty.

Is there a way of adding additional fields to user profiles so that I can display better names or preferred names?

Joss

  • Like 1
Posted

Yes it is. You have to got to "setup->templates->filters (the box at the top)->show system templates" and click on yes. Then you will find "user" in the template list.

  • Like 2
Posted

A user just a (special) page. You could do add child pages, or images xtra fields, what you wish. Beware that that you can't move or delete a user page as you would delete a page.

  • Like 2
Posted

Yep Joss,

Just go ahead and create new fields as normal.

I normally create "first_name" and "second_name" then you can add those fields to the "user" template.

To see "user" template just do as Nico says.

Then output like normal fields:

echo "<h3>Hey! $user->first_name $user->last_name</h3>";

You can then attach any type of fields to the user (photos etc)

  • Like 2
Posted

Ta!

It is amazing what is lurking beneath the hood.

Must find a way to have the hood a little more open? haha!

Posted

A good way of knowing what is possible to do in pw is to keep in mind that the system was built with the exact same tools that are available to us. And that, as on our own websites, everything is a page :)

  • Like 2
Posted

Hello Joss,

Once again, we align! I was wanting the very same thing.

It's great to know that users can be handled so nicely in ProcessWire.

Thanks,

Matthew

PS: Thanks Joss for putting your newbie neck on the line so I didn't have to put mine out this time (I'm doing that in other forum threads).

  • Like 1
Posted

It's great to know that users can be handled so nicely in ProcessWire.

Matthew .... PLEASE rephrase that!!

PS: Thanks Joss for putting your newbie neck on the line so I didn't have to put mine out this time (I'm doing that in other forum threads).

It is the only neck of which I am currently in possession! (Just to prove that I can write proper when I want to)

I am slowly collecting together these tips, by the way. I will make them public at some point - a nicely disorganised jumble of PW bits!

Joss

  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...