Skip Navigation

[Resolved] Broken output in tableview

This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 19 replies, has 2 voices.

Last updated by Minesh 7 years, 3 months ago.

Assisted by: Minesh.

Author
Posts
#565389
Schermafdruk 2017-08-31 00.09.54.png

I am trying to:

Show a table form a view in a view

Link to a page where the issue can be seen:

hidden link

The tab 'Opleidingen'

I expected to see:

A straight tabel like the others on the page

Instead, I got:

See the image

#565457

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - there must be the issue with your HTML code that displays the table. Why I'm saying this because I can see the table is broken with the "Leerlingen" tab as well. Please check the following screenshot:
=> hidden link

Could you please make sure that all HTML tags are closed properly.

#565470

Hi Minesh,
thanks for the reply. I uses te automatic generated HTML in this one:

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<table width="100%">
<thead>
<tr>
<th>[wpv-heading name="post-link"]Naam opleiding[/wpv-heading]</th>
<th>[wpv-heading name="types-field-opleiding-startdatum"]Startdatum[/wpv-heading]</th>
<th>[wpv-heading name="types-field-opleiding-einddatum"]Einddatum[/wpv-heading]</th>
</tr>
</thead>
<tbody class="wpv-loop js-wpv-loop">
<wpv-loop>
<tr>
[wpv-post-body view_template="Loop item in VIV Opleidingen"]
</tr>
</wpv-loop>
</tbody>
</table>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"][/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

#565473

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<table width="100%">
<thead>
<tr>
<th>[wpv-heading name="post-link"]Is leerling[/wpv-heading]</th>
<th>[wpv-heading name="types-field-werknemer-adres-woonplaats"]Werknemer adres woonplaats[/wpv-heading]</th>
</tr>
</thead>
<tbody class="wpv-loop js-wpv-loop">
<wpv-loop>
<tr>
[wpv-post-body view_template="Loop item in VIV leerlingen tonen in werkgevers (toolset)"]
</tr>
</wpv-loop>
</tbody>
</table>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

and

<td>[wpv-post-link]</td>
<td>[types field='werknemer-adres-woonplaats'][/types]</td>
<td>[types field='leerling-bpvo-datum-van'][/types]</td>

#565513

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I see that the table cells are automatically adjusted based on the content it holds inside the cell.

It may adjustment using CSS with default cell size as you can not predict how much content (in words) will be added to the table cell so you need to customize accordingly using some custom CSS.

More info:
=> https://toolset.com/documentation/user-guides/adding-custom-css-views/

#565520

So the HTML tags are ok? I se this for the first time. I uses the view on other places and then it is alright. I don't get it.

#565530

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I need to look at in your code and how you are displaying that view.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#565552

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I can see now table displays with even size - have you done any modifications?

#565556

I did with some css on te employers page. But it's still broken in separated lines isn't it?

#565559

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I see the following output. Please check following screenshot.
=> hidden link

Anyhow, to display even table, you should add the following CSS for the table to be even to each table:
Add the following CSS to your view's CSS section:

.table-fixed {
table-layout: fixed;
}
#565693

Hi Minesh,

thanks for the css. Not the fixed / even width is the problem but I see two times the headings in the table. Ofcourse I want to see a straight tabel with only one row of headings and not very record an separate table. Why are the records separated you think.

#565752

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - are you using view inside view, I mean nested view - if yes, could you please check the loop output and adjust your code accordingly as if the view called two times then and then it will display two headers with one row contained with each table.

Also, I tried to edit the page but I do not see the text editor or when I click on tab page builder it keeps loading and loading hence I could not able to debug this further.

#565763

View #1

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-post-body view_template="Loop item in VIV Opleidingen tonen in Werkgevers"]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

View #2 (cild)

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<table width="100%">
<thead>
<tr>
<th>[wpv-heading name="post-link"]Gevolgde opleidingen[/wpv-heading]</th>
<th>[wpv-heading name="types-field-opleiding-startdatum"]Opleiding startdatum[/wpv-heading]</th>
<th>[wpv-heading name="types-field-opleiding-einddatum"]Opleiding einddatum[/wpv-heading]</th>
</tr>
</thead>
<tbody class="wpv-loop js-wpv-loop">
<wpv-loop>
<tr>
[wpv-post-body view_template="Loop item in VIV Opleidingen"]
</tr>
</wpv-loop>
</tbody>
</table>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"][/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

#565767

Yes a view in a view on BB pagebuilderpage with tabs.

I've send you two loop outputs I'm using. The fist calls the childs (employees (werkgevers)) of the parent page (employer (werknemers)) It views another view (#2) and loops the courses (opleidingen) So on the page employer (werkgevers) its displays all its employees (werknemers) All the employees that are student, all courses of that students anthem ratings of that curses. All works fine except the table of the courses.

#565771

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

well - could you please share the table "head" section to your parent view outside the loop and check it that help you to resolve your issue.