Can I control the width of the title column in a pages section with ‘table’ layout ?
I tried:
works:
type: pages
layout: table
text:
value: "{{page.title}}"
width: 1/3
But it does not work.
Using only width:
under text:
uses the value of width
as title.
I tried manually including a title
column under columns:
, but it is not clickable.
Thanks
David
January 1, 2023, 7:29pm
2
Try it this way
works:
type: pages
layout: table
columns:
title:
width: 1/3
i think the example in the structure field is helpful
David
January 1, 2023, 7:35pm
3
oh… what do you mean with “clickable”?
By default the table layout includes a title column, and this title is a link, so it can be clicked to access the page.
As far as my tests go, if I manually add a title column under columns, it is not clickable (at least by default, I guess I could fix it with a method, but seems overkill)
Cheers
David
January 1, 2023, 8:42pm
5
ah i see.
this is my config… the title is still there and clickable
columns:
kategorie: true
date:
label: datum
value: "{{ page.date.toDate('%d.%m.%Y') }}"
author:
label: Author
value: "{{ page.autor.toUser.name }}"
Yes, but you are not specifying width for it, which was the main point of my question ?
Or am I missing something?
That somehow doesn’t seem to be possible.
On the other hand, if you set up the width of the other columns, you get the difference for the title column, so probably no need to set this explicitly?
I still think It’d make sense to control the width of the title column.
Actually it’d make sense to control other things, such as the numbering, image, etc.
I’ve searched nolt, and found some proposals, and added some of my own, I will list them here as reference and to promote them:
1 Like
There are good reasons not to do that:
opened 06:03PM - 15 Jun 22 UTC
closed 02:50PM - 11 Dec 22 UTC
type: enhancement ✨
> Adding to the last point: the fact that pages are only accessible by clicking … the link in the title field is generally not great, especially on touch devices. The structure field is visually and technically identical, it's also using the table component. There you can click on the full row.
>
> While the Panel does a great job with large enough click areas pretty much everywhere else, the link in the pages table is too small. In my opinion you should at least make the whole cell clickable.
>
> <img width="415" alt="173692498-2381dc55-22df-4abd-a62c-90d20fec7683" src="https://user-images.githubusercontent.com/3788865/173894664-587947f5-3a22-4b46-a862-953d7ce034f3.png">
Original thread: https://github.com/getkirby/kirby/issues/4374
1 Like