Page 1 of 1
changing column with recordcount
Posted: 2025-02-09 12:32
by RonP
Hi,
The need option "Show record count in Homepage" is very functional.
I'm looking for a way to adjust the column with.
Where to do so?
Ron
Re: changing column width recordcount
Posted: 2025-03-24 15:20
by RonP
Hi,
Is a solution nearby
Ron
Re: changing column with recordcount
Posted: 2025-03-26 06:44
by pbottcher
Hi Ron,
what do you want to adjust?
You can select the number of entries shown in a row (between 1 - 4 ).
If you want to change the size of the size of the badge you can try to put something like
Code: Select all
<style>
.table_links .badge {
scale: 1.4;
}
</style>
in the hooks/footer-extras.php
Re: changing column with recordcount
Posted: 2025-03-26 10:51
by RonP
Hi pbottcher,
Thanks for your reply.
I've used your suggestion however ... now expected result.
Maybe the screen dump clears things out.
As the count mostly is < 10 I like to adjust the width, in Tabel View, of the Record Count columns

- Width_recordcount_TV.jpg (33.89 KiB) Viewed 29079 times
Re: changing column with recordcount
Posted: 2025-03-29 08:16
by pbottcher
Hi Ron,
thanks for clarifying, that helps
you may play with this css selector:
Code: Select all
<style>
table [data-table] {
width:400px;
}
</style>
put it in the header-extras.php
or if you address only a specific table you may try
Code: Select all
table[data-tablename="TABLENAME"] [data-table] {
width:200px;
}
Re: changing column with recordcount
Posted: 2025-03-29 13:05
by RonP
Hi pbottcher,
Thanks again, however
I tried both suggestion but I don't see any effect.
I've put the code the "Hooks directory" and later on in de "root directory"
Ron
Re: changing column with recordcount
Posted: 2025-03-29 15:26
by pbottcher
Hi Ron,
can you share where you put the code.
Re: changing column with recordcount
Posted: 2025-03-31 11:39
by RonP
Hi pbottcher
In de
Hooks directory Header-extras.php
The width should be for table contacten
Code: Select all
<style>
table[data-tablename="contacten"] [data-table] {
width:200px;
}
</style>
No changes seen
After that
In de
Main directory Header-extras.php
Code: Select all
<style>
table [data-table] {
width:200px;
}
</style>
No changes seen
Re: changing column with recordcount
Posted: 2025-04-01 06:08
by pbottcher
HI Ron,
can you chech in the developers tool the tablename you are using. In my example the tablen is calles contribution and the code in the hooks/header-extras is:
Code: Select all
<style>
table[data-tablename="contribution"] [data-table] {
width:500px;
}
</style>
<?php
Just for testing, put the style code to the top of your header-extras.php file, before the <?php tag.

- tablename.png (3.51 KiB) Viewed 27945 times
This expands the table column correctly to 500px on my system.
Re: changing column with recordcount
Posted: 2025-04-02 13:21
by RonP
Hi pbottcher,
The "overrule" is correct however I don't see any column width adjustments

- Overruled_width.png (183.21 KiB) Viewed 27758 times
Ron
Re: changing column with recordcount
Posted: 2025-04-02 14:15
by jsetzer
Sorry, I think the CSS selector should be different.
Given table name =
services
and column name =
name
, the following code can be used to set the width of column
services-name
to
600px
:
Code: Select all
<!-- file: hooks/header-extras.php -->
<style>
table[data-tablename="services"]>tbody>tr>td.services-name {
min-width: 600px;
}
</style>

- chrome_4uayIN6R2R.png (155.53 KiB) Viewed 27753 times
You can play around with
min-width
,
max-width
,
width
and, obviously, change
600px
to something different like
30%
or any valid CSS size value.
---
If this is a default table view (as long as you don't have multipe tables in the same page), this can be
even easier:
Code: Select all
<!-- file: hooks/header-extras.php -->
<style>
/* given: table name = "services" and column name = "name" */
table[data-tablename] .services-name {
min-width: 600px;
}
</style>
I hope this helps!
Re: changing column with recordcount
Posted: 2025-04-06 09:26
by pbottcher
Hi again,
not sure why it would not work. I think you are talking about the reference columns in the table.
You may check in your setting:
As example I use the basetable to be adressed with 2 reference columns ( reftable and reftable_1)

- references.png (13.63 KiB) Viewed 26110 times
without styling:

- reference_standard.png (26.58 KiB) Viewed 26110 times
and with applied styles in the hooks/header-extras.php file:
Code: Select all
<style>
table[data-tablename="basetable"] [data-table] {
width:20px;
background: lightgray;
}
table[data-tablename="basetable"] [data-table="reftable_1"] {
width:200px;
background: lightblue;
}
</style>

- reference_style.png (137.38 KiB) Viewed 26110 times
The first style would be applied to all columns, the second one only to the reftable_1 column.
Re: changing column with recordcount
Posted: 2025-04-06 12:07
by RonP
Hi Guys,
Thank you for thinking with me
I've found a very simple solution:
I've adjusted the "Tab/Column Title in "box" Parent/Children settings.
Likewise for the other Tab/Column Titles
Ron
Re: changing column with recordcount
Posted: 2025-04-06 15:46
by pbottcher
Hi Ron,
great that you found a solution. Out of curiosity, you do not have ticked the box for "Show count of children in table view (TV)".

- childcount.png (22 KiB) Viewed 26080 times
So to which width are you refering?
My thought was that we talk about this column, that will be added to the TV.
Re: changing column with recordcount
Posted: 2025-04-07 09:34
by RonP
Hi pbottcher
That was "sharp" of you!
Now that you mention it I didn't pay attention at it, however it occurred some versions ago.
I just activated the "Count in TV" and that went well, numbers appeared.
After that I deactivated the Count, however, the columns are still shown, with no values in the columns.
Ron

- Width-show_count_TV.JPG (105.93 KiB) Viewed 25918 times