Jump to content

Recommended Posts

Posted

Hi,
 
just started digging in processwire for a few days and coming from wordpress and drupal I really like the flexibility coming with it. Great job!
So for now I made my own template with some basic layouts, which is working super easy as expected.
I'm trying to add some custom userfields now and run into some problems.
 
I tried to add fields via the adminpages and end up geting some page fields, but I want them to be in my $user page.

$user->web = 'http://www.test.de';
$user->save();

foreach ( $user as $key => $val ) {
	echo $key ." => ". $val ."<br />";
}

foreach($fields as $field)
	echo $field->name . ", ";

Now I've tried to set and retrieve my fields and get something like this:

id => 41
name => h4r4ld
status => 1
numChildren => 0
sort => 0
sortfield => sort
modified_users_id => 41
created_users_id => 2
created => 1300560086
modified => 1448443393
published => 1300560086
pass => adasd23154grsfs
email => email@adress.de
roles => 37|38|1014

about, backname, body, email, foto, headline, images, nickname, pageicon, pass, permissions, position, process, roles, sidebar, siteslug, summary, surname, title, web,

I can get the fields, but they are not where I want them to be.

Is there a way to add fields to the userpage with e.g. code or a tutorial/howto I didn't found?

Best,

Harri

Posted

Welcome to the forum. You should read some tutorials, like this one.
http://processwire.com/docs/tutorials/simple-website-tutorials/

In ProcessWire nearly everything is a $page (even users, roles, permissions)
If you want to assign more fields to the user template.

  1. Create the fields, you need
  2. Go to templates. Select Filters, Show system templates
  3. Select template 'user' and add any field you have in your system

If you want to see the fields in the user profile, you have to add them in the settings of Module ProcessProfile.

 

  • Like 3
Posted

Welcome to the forum. You should read some tutorials, like this one.

http://processwire.com/docs/tutorials/simple-website-tutorials/

In ProcessWire nearly everything is a $page (even users, roles, permissions)

If you want to assign more fields to the user template.

  1. Create the fields, you need
  2. Go to templates. Select Filters, Show system templates
  3. Select template 'user' and add any field you have in your system

If you want to see the fields in the user profile, you have to add them in the settings of Module ProcessProfile.

Thanks for that link, I was crawling the forum for links/posts like this, wrong place. ;)

I was following another tutorial to add custom fields and added them to the wrong page.

  • Like 1

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...