Skip Navigation

[Closed] Classes added to View Loop are applied to nth child (single) loop items

This support ticket is created 3 years, 10 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 3 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1679429

This one might seem like a silly non-issue but it can be a showstopper. I also might be missing a hidden feature but I think I've checked every possible section...

Look at BS'4 Cards DOC hidden link
In Views, you can easily create those cards using BS helper classes.

What you can't do is wrap the entire loop (all loop items) in one parent div (for giving it the "card-group" class in this case).

The most intuitive for me would be to add class to the "View Loop" as seen in my screenshot, but, if you add a class there, it will not add that class to the actual "loop", instead it'll add it to the single items in the loop!.

Apart from being counterintuitive (and wrong, IMO), it also is simply impossible to wrap your loop in a "container" like BS'4 structure demands here.
I think this is not only an important thing for Bootstrap, but will always be important when you want a to control a div that is the direct parent of the loop.

It seems to me, it's impossible to control the actual loop output in this sense, only the single items or the very container of the entire View can be controlled.

Let me know if I miss something.

Right now due to this, you cannot create Bootstrap Cards with same height using Bootstrap Utilities (without hacking around)

Cheers

#1679991
card-group2.JPG
card-group1.JPG

Hi Beda,

I don't see the screenshot you mentioned above, so I have tried it in my localhost with the latest version of Toolset plugins, create a view using classic editor and block editor, but I don't see the problem you mentioned above:

if you add a class there, it will not add that class to the actual "loop", instead it'll add it to the single items in the loop!

See my screenshots.

Please check the compatibility issue, if the problem still persists, please provide database dump file and detail steps. thanks

#1684527
Add class to View Loop.png
Class is NOT applied to the Loop, but to the SINGLE Loop Items.png

I'm terribly sorry, Luo - I should have said "Blocks" and not "Views" because I used Toolset Blocks built "Views".

Attached are also the screenshots.

----

I have a very important addon Question, please try to confirm this with the team and plugin management.

Q) Is it actually still OK to use Toolset Views on new sites?
I just saw that Toolset Views is marked as "Legacy" too now, just like Layouts:
https://toolset.com/account/downloads/#legacy-plugins

Q) As you probably know, without Toolset Layouts, you can't build "entire" sites from header to footer. Does Toolset suggest some solution here other than using a Theme with lots of options (and hence bloat)?

Since both plugins are marked as "legacy" I am not sure if it still can be used, but if we don't use it, you either need to create child themes, or use Elementor (which then will likely conflict with some Toolset Features) to control the full layout.

I actually switched to use Blocks but found a number of issues, which make me think to continue using Views because the major problems like export-import of Views, for example, happen only in Blocks.
But then again, I don't feel comfortable in building new sites, using a plugin that is been marked as "legacy".

Could you please confirm officially what the plans are and if Toolset Layouts and Views should, could or do not have to be used at all on newly built sites?

Thank you!

#1684777

Thanks for the details, the screenshot you provided above: option "Views Loop"
https://toolset.com/wp-content/uploads/2020/07/1684527-Add_class_to_View_Loop.png

It will select the item of Views loop, it does not select entire loop DIV wrapper.

In my opinion, it needs to add another option "Views Loop Item", so users can:
- Choose option option "Views Loop": select entire loop DIV wrapper
- Choose option option "Views Loop Item": select item of Views loop.

Can you confirm it? As you know, I need to submit it as a feature request, thanks

The topic ‘[Closed] Classes added to View Loop are applied to nth child (single) loop items’ is closed to new replies.