SPECIAL OFFER: Only $69 for access to everything in OSTraining for 1 year! You save $75!  1
Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!

Using Panels to present User Information

6 years 1 month ago #116547 by jcross
I would like to use Panels to modify the current way Drupal displays User information.

The site I'm designing will have members, and when a member signs in I would like to display their information differently . I have Googled on this subject and I've not gotten very far. I did change the user_edit and user_view (within Pages) to be editable) per a recommendation I did find using Google.

Has anyone else done this? I'm using the current version of Drupal 7.

I have been viewing the Panel tutorials (not all the way through yet) and I've heard this can be done. I just need a bit of guidance on how to get started.

Please Log in to join the conversation.

6 years 1 month ago #116553 by steve
Replied by steve on topic Using Panels to present User Information
Hi and welcome, jcross

There are two modules that can help here: Panels and also Display Suite.

In my experience, Display Suite is much easier for most people.

However, taking a step back, can you explain more about what you want to change? Is it just the layout?

Please Log in to join the conversation.

6 years 1 month ago #116557 by jcross
Replied by jcross on topic Using Panels to present User Information
I tried Display Suite which does not break out the user profile info very neatly. By this I mean I try to put in line breaks around certain bits of information and it doesn't appear to work. Everything stacks on top of one another.

I want to present a more user-friendly page - one that is cosmetically appealing. I might be missing something in Display Suite that can do this?

Thanks!

Please Log in to join the conversation.

6 years 1 month ago #116560 by steve
Replied by steve on topic Using Panels to present User Information
Hi jcross

Did you try a 2 or 3 column layout in Display Suite. It should be able to handle line breaks and other design elements fairly easily.

Please Log in to join the conversation.

6 years 1 month ago #116564 by jcross
Replied by jcross on topic Using Panels to present User Information
I have it set up as a 3 column display - the RIGHT column has the photo, the CENTER column has the user profile information and the LEFT column is consistent across most of the website (logout, who's online, etc).

I thought there might be a way under "Manage Display" where I could insert some HTML to do line breaks, headings, etc. If there is a trick to do this I'm all ears.

Please Log in to join the conversation.

6 years 1 month ago #116567 by steve
Replied by steve on topic Using Panels to present User Information
Yes, although it might be best to use the "classes" feature in Display Suite to surround items and add a little margin or padding with CSS.

Please Log in to join the conversation.

6 years 1 month ago #116568 by jcross
Replied by jcross on topic Using Panels to present User Information
Could you give an example of doing this? I'm a CSS Novice at best.

So if I have a field called STATE and I want a blank line to be inserted in the display after STATE is displayed, how would I do this?

Please Log in to join the conversation.

6 years 1 month ago #116569 by jcross
Replied by jcross on topic Using Panels to present User Information
This is where I thought Panels would help with laying out the user information. Back to the original question - is there a way using Panels to redo the User Profile display?

Please Log in to join the conversation.

6 years 1 month ago #116570 by steve
Replied by steve on topic Using Panels to present User Information
Yes, if you have Panels plus the "Page Manager" parts of the CTools module enabled.

Then, go to Structure > Panels and you'll see "Manage Pages" on the right.

You can choose to enable and modify the "User" template.

Please Log in to join the conversation.

6 years 1 month ago #116571 by jcross
Replied by jcross on topic Using Panels to present User Information
Correct.

What Steps I perform next are:
  1. Manage Pages (Users)
  2. Add a variant
  3. On the "Add variant" page - accept all defaults - click on Create variant
  4. On "Configure" I select 2-column stacked - click on continue
  5. Accept all defaults on the next Configure screen - click continue

So now I'm on the Configure screen showing the TOP, LEFT, RIGHT and BOTTOM regions. Leaving "Title type" set to Manually set I select "Right Side" and select "add content".

I immediately get "You are not authorized to access this page" - yet I'm logged in as the administrator.

I'm enjoying learning Drupal - but it is a long journey....

Please Log in to join the conversation.

6 years 1 month ago #116572 by steve
Replied by steve on topic Using Panels to present User Information
Hi jcross

There's a few possible causes for this.

If you're using Chrome, could you swap browsers or try deleting your cookies.

Or, could you try repairing the session table in PHPMyAdmin as here: www.ostraining.com/blog/joomla/joomla-session-crashed/

Both those ideas come from this discussion: www.drupal.org/node/2399055

Please Log in to join the conversation.

6 years 1 month ago #116638 by jcross
Replied by jcross on topic Using Panels to present User Information
Going from Chrome to IE did resolve the permissions issue - good call!

So a new question is this - when I go to Structure->Pages->Edit User I create a variant which has the User info and Tokens. Great! But when I go to Structure->Panels->Mange Pages->Users the variant I created under Page->Edit User is not there. Furthermore if I try to create a new variant using Panels the USER information and/or Tokens are not available.

At this point is it best to just use the Pages->Edit User? Or - is there something I'm missing by using Panels->Manage Pages->Users?

Thanks!

Please Log in to join the conversation.

6 years 1 month ago #116666 by steve
Replied by steve on topic Using Panels to present User Information
Hi jcross

I believe you're dealing with 2 different pages here.

One page is the editing screen, "Edit Users" where the users update their own details

The other page is the actual presentation of the information.

Please Log in to join the conversation.

6 years 1 month ago #116669 by jcross
Replied by jcross on topic Using Panels to present User Information
I did finally make this distinction - I'm good to go and I can close this case.

I did open another about how to pad between pictures. I set up a field within each member of the site I'm designing where they can store as many photos as they want. When it comes time to display those photos - using Panels works fine but the photos are pushed up against each other and I'm trying to find a way to add some padding.

Thanks for your assistance on getting me going further with Panels. If you can assist with my new toipc that would be great.

Please Log in to join the conversation.

6 years 1 month ago #116673 by steve
Replied by steve on topic Using Panels to present User Information
Thanks jcross

I've answered that other question already. Hope to help you again over there.

Please Log in to join the conversation.

Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!