[buddypress-trac] [BuddyPress Trac] #7091: Template Enhancement: On templates with loops (ie. groups/single/members) provide more context with messages on empty
buddypress-trac
noreply at wordpress.org
Thu May 26 02:54:06 UTC 2016
#7091: Template Enhancement: On templates with loops (ie. groups/single/members)
provide more context with messages on empty
-----------------------------------------+-----------------------------
Reporter: garrett-eclipse | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Appearance - Template Parts | Version: 2.5.0
Severity: normal | Keywords:
-----------------------------------------+-----------------------------
Hello,
Within most templates that have a loop such as the
groups/single/members.php the conditional (if bp_group_has_members) has an
else which provides a message in this case 'No members were found'.
I'd like to request the else portion of these type of conditionals to
check if we're dealing with a search request which is turning up empty or
if there are simply no items (ie. members).
So currently the else holds;
{{{#!php
<?php else: ?>
<div id="message" class="info">
<p><?php _e( 'No members were found.', 'buddypress' );
?></p>
</div>
<?php endif; ?>
}}}
I would like this to have a check for if search and provide alternate
messaging depending upon this so the user knows if there are actually no
items (members) or if there were simply none found.
{{{#!php
<?php else: ?>
<?php if ( isset( $_REQUEST['members_search'] ) ) : ?>
<div id="message" class="info">
<p><?php _e( 'No members were found.',
'buddypress' ); ?></p>
</div>
<?php else: ?>
<div id="message" class="info">
<p><?php _e( 'This group has no members.',
'buddypress' ); ?></p>
</div>
<?php endif; ?>
<?php endif; ?>
}}}
Thank you
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7091>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list