Skip Navigation

[Resolved] Assistance with updating grouping output by session code you helped with before.

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 2 replies, has 2 voices.

Last updated by brettB-4 1 year, 3 months ago.

Assisted by: Minesh.

Author
Posts
#2643339

Minesh previously assisted us with setting up our Standings system to display grouped by Session. If you filter the Standings on the Atlanta tournament by going here:

hidden link

You can see what is now wrong is we need the groupings by session setup you did for us to only display conditionally when the view has results. It should not display when the view results are "No items found". But that is set up on the page as follows, for example:

<h3>Morning - 3.0</h3>
[wpv-view name="teams-posts-by-session" session="Morning - 3.0"]

I'm not sure how I'd make that output conditional since it isn't in the View. I'd like to do something like this:

[wpv-conditional if="( '[wpv-items-count]' gt '0' )"]
<h3>Morning - 3.0</h3>
[wpv-view name="teams-posts-by-session" session="Morning - 3.0"]
[/wpv-conditional]

But I don't think this will work because it won't know that it is checking for if that particular session filter contains items or not and it probably won't even know where it is checking for an items count.

The goal is to not have the header or the view display at all unless the filtered view has items.

#2643969

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

You have added the view's as given under - where Luo help you with the following structure before I step in.

<h3>Morning - 3.0</h3>
[wpv-view name="teams-posts-by-session" session="Morning - 3.0"]
<h3>Morning - 3.5</h3>
[wpv-view name="teams-posts-by-session" session="Morning - 3.5"]
<h3>Morning - 4.0+</h3>
[wpv-view name="teams-posts-by-session" session="Morning - 4.0+"]
<h3>Afternoon - 3.0</h3>
[wpv-view name="teams-posts-by-session" session="Afternoon - 3.0"]
<h3>Afternoon - 3.5</h3>
[wpv-view name="teams-posts-by-session" session="Afternoon - 3.5"]
<h3>Afternoon - 4.0+</h3>
[wpv-view name="teams-posts-by-session" session="Afternoon - 4.0+"]
<h3>3.0</h3>
[wpv-view name="teams-posts-by-session" session="3.0"]
<h3>3.5</h3>
[wpv-view name="teams-posts-by-session" session="3.5"]
<h3>3.0 - 49 and under</h3>
[wpv-view name="teams-posts-by-session" session="3.0 - 49 and under"]
<h3>3.0 - 50+</h3>
[wpv-view name="teams-posts-by-session" session="3.0 - 50+"]
<h3>3.5 - 49 and under</h3>
[wpv-view name="teams-posts-by-session" session="3.5 - 49 and under"]
<h3>3.5 - 49 and under - Pool B</h3>
[wpv-view name="teams-posts-by-session" session="3.5 - 49 and under - Pool B"]
<h3>3.5 - 50+</h3>
[wpv-view name="teams-posts-by-session" session="3.5 - 50+"]
<h3>4.0</h3>
[wpv-view name="teams-posts-by-session" session="4.0"]
<h3>4.0 - Pool B</h3>
[wpv-view name="teams-posts-by-session" session="4.0 - Pool B"]
<h3>4.5</h3>
[wpv-view name="teams-posts-by-session" session="4.5"]
<h3>Beginner (2.0-2.5)</h3>
[wpv-view name="teams-posts-by-session" session="Beginner (2.0-2.5)"]
<h3>Intermediate (2.5-3.0)</h3>
[wpv-view name="teams-posts-by-session" session="Intermediate (2.5-3.0)"]
<h3>Competitive (3.0 and up)</h3>
[wpv-view name="teams-posts-by-session" session="Competitive (3.0 and up)"]

Instead of using conditional statement I have another way to fix this that will be quick and easy solution.

Now, I removed all H3 tags added before your view and now all view's are added as given under with your following page:
=> hidden link

[wpv-view name="teams-posts-by-session" session="Morning - 3.0"]
[wpv-view name="teams-posts-by-session" session="Morning - 3.5"]
[wpv-view name="teams-posts-by-session" session="Morning - 4.0+"]
[wpv-view name="teams-posts-by-session" session="Afternoon - 3.0"]
[wpv-view name="teams-posts-by-session" session="Afternoon - 3.5"]
[wpv-view name="teams-posts-by-session" session="Afternoon - 4.0+"]
[wpv-view name="teams-posts-by-session" session="3.0"]
[wpv-view name="teams-posts-by-session" session="3.5"]
[wpv-view name="teams-posts-by-session" session="3.0 - 49 and under"]
[wpv-view name="teams-posts-by-session" session="3.0 - 50+"]
[wpv-view name="teams-posts-by-session" session="3.5 - 49 and under"]
[wpv-view name="teams-posts-by-session" session="3.5 - 49 and under - Pool B"]
[wpv-view name="teams-posts-by-session" session="3.5 - 50+"]
[wpv-view name="teams-posts-by-session" session="4.0"]
[wpv-view name="teams-posts-by-session" session="4.0 - Pool B"]
[wpv-view name="teams-posts-by-session" session="4.5"]
[wpv-view name="teams-posts-by-session" session="Beginner (2.0-2.5)"]
[wpv-view name="teams-posts-by-session" session="Intermediate (2.5-3.0)"]
[wpv-view name="teams-posts-by-session" session="Competitive (3.0 and up)"]

And within your view's "Loop Editor" section I've added the following shortcode just after the [wpv-items-found] shortcode:
=> hidden link

 <h3>[wpv-attribute name="session"]</h3>

More info:
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-attribute

And I've also removed the "no items found" string from [wpv-no-items-found][/wpv-no-items-found] section of your view from the "Loop Editor' section.

Can you please confirm it works as expected now:
- hidden link

#2644125

Looks PERFECT!!! Thanks a bunch. You guys have phenomenal logic skills. I bow to you. 😉

I'm usually pretty good with thinking through options like this where you accomplish the same thing with a totally different approach (for example, making a right turn by making three left turns). I'm thinking I'm intimidated by not knowing how to do everything in Toolset and that is keeping my confidence level too low to come up with these kinds of solutions myself. I tell my clients that I'm at a high school level of Toolset knowledge/skill but the stuff we're trying to do is at PhD college level and that is why I'm having to get so much help from you wherever we're going for new advanced functionality at this level. I am getting better at some of this myself just by seeing how you guys do things in all these support tickets, but I'm not getting better to where I feel like I've graduated from high school yet. Believe me, I'm trying my absolute best to limit the number of tickets I'm filing here. I usually work on things to the point of exasperation before I give up and file a ticket. But on this site, every time the client changes anything structural in what we've set up, I'm feeling like I'm over my head. And the structural changes keep coming seemingly with every tournament. Eventually we'll have every structure accounted for and the system will be phenomenally flexible with all the conditionals handling this.

I'm glad this fix was a comparatively quick and easy one. The other ticket you're helping us on with the wins and losses is a much more difficult one.

#2644127

AWESOME!!!