Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Profile content blank after trying to copy profile template

9 years 2 months ago #269409 by wdburgdorf
"Nearly" is perhaps the key here. There were some essential elements that had none. For example the administrative links on the very top of the details page. I have no use for those. The "Edit" link is a special case: I need that, but I don't think it makes sense to have it on profiles that the logged in user cannot edit. This is more than a CSS issue, though.

Editing empty fields: yes, that is indeed a problem. Why are empty fields also hidden in the edit form?

The situation: I offer many fields in the profiles. All of the members are pre-entered. Almost all profiles are nearly empty, I want the members to fill in the details later, if they like. The profile pages look terrible with long lists of empty fields, therefore I want to hide them. Other than name and address, all fields are optional, and many will always stay empty. With all those empty fields shown, it is much more difficult than necessary to see which information is actually available and to find it.

This would be no problem if I could choose to hide empty fields ONLY on the profile details page, not the overview or (especially) the profile edit page.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
9 years 2 months ago - 9 years 2 months ago #269410 by krileon

"Nearly" is perhaps the key here. There were some essential elements that had none. For example the administrative links on the very top of the details page. I have no use for those. The "Edit" link is a special case: I need that, but I don't think it makes sense to have it on profiles that the logged in user cannot edit. This is more than a CSS issue, though.

Every menu item on the CB Menu bar has a CSS class specific to it. This allows entire top level menu items or submenu items to be removed entirely through CSS. Until we've a backend to manage the menu items that's basically the only way to remove them as it's entirely API driven at this time. You can also completely disable the tab as well if it doesn't really fit your needs. Example as follows.

Moderate: cbMenu_UE_MENU_MODERATE
View: cbMenu_UE_MENU_VIEW
Send Email to User: cbMenu_UE_MENU_SENDUSEREMAIL

Editing empty fields: yes, that is indeed a problem. Why are empty fields also hidden in the edit form?

The situation: I offer many fields in the profiles. All of the members are pre-entered. Almost all profiles are nearly empty, I want the members to fill in the details later, if they like. The profile pages look terrible with long lists of empty fields, therefore I want to hide them. Other than name and address, all fields are optional, and many will always stay empty. With all those empty fields shown, it is much more difficult than necessary to see which information is actually available and to find it.

This would be no problem if I could choose to hide empty fields ONLY on the profile details page, not the overview or (especially) the profile edit page.

I don't understand what problem you're having here, but the wrong terminology is causing some confusion. There's Profile View and Profile Edit. When setting empty fields to hide in CB > Configuration > User Profile (set Show Empty Fields to No) it causes those empty fields to hide in Profile View. It has absolutely no affect on Profile Edit.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 9 years 2 months ago by krileon.

Please Log in or Create an account to join the conversation.

9 years 2 months ago #269415 by wdburgdorf
What is this about:

Moderate: cbMenu_UE_MENU_MODERATE
View: cbMenu_UE_MENU_VIEW
Send Email to User: cbMenu_UE_MENU_SENDUSEREMAIL

???

Completely hiding the tab would also hide the Edit button - which I need (but only when user has rights to edit)... So we're back at the beginning, I need to edit the template. Or is that something that I could somehow do with "cbMenu_UE_MENU_MODERATE" etc.?

Profile Edit: You said earlier:

Hiding empty fields in profile edit doesn't make any sense as you won't be able to edit the fields if that's the case

I checked it, by deleting the content of one field in my own profile, and when I updated the Edit page, that field indeed disappeared completely. Therefore I assumed all empty fields would be hidden from Profile Edit. Now, after your comment, I checked again, and that empty field has reappeared. I tried the same thing again, but it does not happen anymore.
There is a completely different issue now, a bit less severe: When clicking "Update" in Profile Edit, the page is not updated, but the Profile View is loaded instead.

Another missing class example that I just noticed: In Profile Edit I'd like the Avatar image to float left of the dropdown. The class is "cb_field col-sm-9". I could use the id of the parent div which is "cbfr_29" - but it's just numbered, I'm not sure if the numbering won't change. The label of that field has the id "cblabavatar" - perfect!

Sure, you probably have more important things to take care of. Just if you happen to work on that code anyway at some point, maybe you can make some changes here, too.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
9 years 2 months ago #269423 by krileon

Completely hiding the tab would also hide the Edit button - which I need (but only when user has rights to edit)... So we're back at the beginning, I need to edit the template. Or is that something that I could somehow do with "cbMenu_UE_MENU_MODERATE" etc.?

Each menu item on CB Menu has a CSS class. The above is a few of those. You can use CSS to hide them individually. Example as follows.

Code:
.cbMenu_UE_MENU_MODERATE { display: none !important; }

Where you put the CSS is up to you, but Joomla template CSS file is a good option. Even better is a custom CSS file if your template loads one.

There is a completely different issue now, a bit less severe: When clicking "Update" in Profile Edit, the page is not updated, but the Profile View is loaded instead.

Clicking update will update their profile and redirect to profile view. CB has always functioned this way. It does not stay on profile edit unless there's an error.

Another missing class example that I just noticed: In Profile Edit I'd like the Avatar image to float left of the dropdown. The class is "cb_field col-sm-9". I could use the id of the parent div which is "cbfr_29" - but it's just numbered, I'm not sure if the numbering won't change. The label of that field has the id "cblabavatar" - perfect!

You can add a custom CSS class to each fields container by editing the field and setting CSS Class parameter. Each field container also has a unique ID specific to the field by its Field ID, which is what cbfr_29 is for example. IDs can be used in CSS selectors. The ID does not change unless the fields id changes, which doesn't happen for core fields, but it's easier to just use the CSS Class parameter.

Sure, you probably have more important things to take care of. Just if you happen to work on that code anyway at some point, maybe you can make some changes here, too.

There's nothing to change. There are CSS classes, IDs, and parameters to add custom CSS classes that can all be used to customize the styling. If that's not enough you can also use the Layout parameters of a field to surround the fields value output with your elements.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum