Skip Navigation

[Resuelto] Add custom field value to View Loop item contener

This support ticket is created hace 2 años, 2 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Etiquetado: 

Este tema contiene 6 respuestas, tiene 2 mensajes.

Última actualización por diyanK hace 2 años, 2 meses.

Asistido por: Minesh.

Autor
Mensajes
#2462929

Hi team,

I need a way to change the background of a table row in a specific View Loop.

Best case scenario is if I can set a class that has the value of the a specific custom field from the current post in the loop.

Worst case scenario is I have to come up with a jQuery solution to do that on the front-end.

Any help is appreciated.

Thanks!

#2463417

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

First of all, I would like to know are you using classic view or block view.

Can you please share the screenshot of your view, once I review that I would be able to guide you in the right direction.

In addition to that, I would like to have debug information that will help us to debug and investigate your issue:
- https://toolset.com/faq/provide-debug-information-faster-support/

#2463459
Screenshot 2022-09-23 at 10.19.42.png

Hi Minesh,

I'm using blocks, screenshot attached.

Note the last custom field that says PO Status – values from this field I'd like to use as classes.

PS. Please note how bad looks the view in a Table format when previewed in Gutenberg, and when there are more than the default amount of rows. I guess you need to address this issue separately as well. It's quite annoying. I planned to report it, but it never turned into a show stopper for me, but since now we're at it - it's worth mentioning the issue as well.

Thanks in advance!

#2463479

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

As you are using the block view - there is no way to adjust the table row class using the custom field value.

The workaround would be if you go with classic view there you will have more control on output as you can adjust the HTML code and assign the dynamic custom field values using row.

PS. Please note how bad looks the view in a Table format when previewed in Gutenberg, and when there are more than the default amount of rows. I guess you need to address this issue separately as well. It's quite annoying. I planned to report it, but it never turned into a show stopper for me, but since now we're at it - it's worth mentioning the issue as well.
==>
We know that and the GUI is not that so impressive for the table based view. We will try to improve that but in future and there is no ETA on it.

#2463481

OKay,

Classic view is fine, I can perfectly deal with that.

I stopped using the classic view in order to move faster to an all-blocks stack, and to be on the safe side in the future.

Do you have a plan on turning off support for the classic views? Is it safe to use for a project that is planned to last for another 5 years or so?

Thanks!

#2463559

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Do you have a plan on turning off support for the classic views? Is it safe to use for a project that is planned to last for another 5 years or so?
==>
We are not going to stop supporting classic views so you should use it without any concerns.

#2463643

Awesome!

My issue is resolved now. Thank you!