Thread Starter
uili
(@uili)
ok.. that was easy…
i made one template called championship-compact.php
with this code:
<?php foreach ( $championship->getGroups() AS $key => $group ) : ?>
<?php $teams = $leaguemanager->getTeams( "<code>league_id</code> = '".$league->id."' AND <code>season</code> = '".$league->season."' AND <code>group</code> = '".$group."'" ); ?>
<?php $matches = $leaguemanager->getMatches( "<code>league_id</code>= '".$league->id."' AND <code>season</code> = '".$league->season."' AND <code>final</code> = '' AND <code>group</code> = '".$group."'" ); ?>
<h4><?php printf(__('Group %s', 'leaguemanager'), $group) ?></h4>
<?php leaguemanager_standings( $league->id, array('season' => $league->season, 'group' => $group, 'template' => 'compact', 'logo' => false) ); ?>
<?php endforeach; ?>
and on my widgets i added a text block with this shortcode:
[championship league_id=1 template=compact]
So I tried this but I get MYSql errors. Any idea?
http://bfl.cp3designs.com/teams/
I’m not sure what the ‘' and '‘ tags are for, but those are causing your problem from what it looks like.
Just curious, have you tried this:
[standings league_id=1 group=A]
The standings will list all teams unless you request a certain group. If I have a league with the same four groups, I have
[standings league_id=1 group=A]
[standings league_id=1 group=B]
[standings league_id=1 group=C]
[standings league_id=1 group=D]
and get four tables, one for each group. Is that what you’re looking for?
I cant seem to find my group IDs anywhere. I’ve tried that not getting anything to show up.
The Groups are set up in the league preferences and then the teams have to be set up within the groups for it to work properly.
Right I have the groups setup for instance. I’m using this for a Madden Football league and I have the groups setup as divisions. AFC East, AFC West, etc etc. I also have the teams established in the groups. When I use your code
[standings league_id=3 group=AFC East]
[standings league_id=1 group=A]
[standings league_id=1 group=1]
None of those show anything when I save it on a page.
If you want I can take a look at it from the inside and see what I can come up with.