Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

Field group display template

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
7 months 3 weeks ago #337719 by galanopd
Field group display template was created by galanopd
Hi,
In a field group, I have Parameters->Display->Display Template->Table, and I need the ascending numbering not to be displayed on the front end.
Is that possible somehow?

Thanks
 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
7 months 3 weeks ago #337720 by krileon
Replied by krileon on topic Field group display template
The HTML is designed with that column in place. You can use the below CSS to hide it though.
Code:
.cbFieldGroupRow > td:not(.cbFieldGroupRowCell), tr.cbRepeatRow .cbRepeatRowNumber { display: none; }

Should hide it on profile view and 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.

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

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
7 months 3 weeks ago - 7 months 3 weeks ago #337721 by galanopd
Replied by galanopd on topic Field group display template
It looks that the code hides the first column cells but not the heading of the column which is named (#)...

Edit: This would hide the whole th row 
Code:
th:not(.cbFieldGroupRowCell),
Last edit: 7 months 3 weeks ago by galanopd.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
7 months 3 weeks ago #337722 by krileon
Replied by krileon on topic Field group display template
You'll have to try and write the necessary CSS for that or make your own template for CB Field Groups. Adding new templates is just a matter of adding a folder to the below location.

/components/com_comprofiler/plugin/user/plug_cbfieldgroups/templates

So for example the following could be a new template.

/components/com_comprofiler/plugin/user/plug_cbfieldgroups/templates/mytable

You then add what files you want to override from "default" template (or any of the others) and modify them as desired. Now you can select your template within your field group field.

In your case making a copy of the "table" template and modifying it to fit your needs is probably the easiest solution to have exactly the table structure you want. As for CSS solutions you can try things like the following.
Code:
.cbFieldGroupTable thead tr th:first-child { display: none; }


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.

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
7 months 3 weeks ago #337723 by galanopd
Replied by galanopd on topic Field group display template
I worked it out a minute before your answer, using
Code:
.cbFieldGroupRow > td:not(.cbFieldGroupRowCell),  th:first-child:not(.cbFieldGroupRowCell), tr.cbRepeatRow .cbRepeatRowNumber {     display: none; }
and what you suggest is very helpful as addding CSS modifications to Overrides is applied globaly while your suggestion allows template selection.

Thank you Kyle
 

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

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
7 months 3 weeks ago - 7 months 3 weeks ago #337725 by galanopd
Replied by galanopd on topic Field group display template
It seems that CSS modifications are not applied properly on profile edit. Table is not shown correctly...
To be honest, I don't mind applying the CSS changes on profile edit but only on profile view. But in this case the table on profile edit is not shown correctly

EDIT: I found out why. This happens only when Group Reordering on Field Group Parameters is set to Yes, as it adds a column in the beginning of the table to allow the reordering
Last edit: 7 months 3 weeks ago by galanopd.

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

Moderators: beatnantkrileon
Powered by Kunena Forum