Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Must I set up subnav items when creating a new component?

@modemlooper

Moderator

you need some way of knowing what page you are on and using uri to get a page number is the best way and it works like WP pagination.

bp_action_variables are stored as an array so it’s easy to tap into:

posts/page/2/3/4

$bp->action_variables[0] == 2
$bp->action_variables[1] == 3
$bp->action_variables[2] == 4

So if you did a front end editing of a post you could do

posts/post/2/edit

do an if ( $bp->action_variables[1] == ‘edit’ )

then display an edit screen instead of the normal post screen

Skip to toolbar