h4r4ld Posted November 25, 2015 Posted November 25, 2015 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 => 41name => h4r4ldstatus => 1numChildren => 0sort => 0sortfield => sortmodified_users_id => 41created_users_id => 2created => 1300560086modified => 1448443393published => 1300560086pass => adasd23154grsfsemail => email@adress.deroles => 37|38|1014about, 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
kixe Posted November 25, 2015 Posted November 25, 2015 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. Create the fields, you need Go to templates. Select Filters, Show system templates 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. 3
h4r4ld Posted November 25, 2015 Author Posted November 25, 2015 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. Create the fields, you need Go to templates. Select Filters, Show system templates 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. 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now