Skip to:
Content
Pages
Categories
Search
Top
Bottom

beta 1.1 & custom component : navigation broken ?

  • Avatar of Grosbouff
    grosbouff
    Participant

    @grosbouff

    Hi guys;

    I’m not running under BP Beta 1.1 and trying to adapt my own component to the new system.

    My function for the directory :

    function classifieds_directory_classifieds_setup() {

    global $bp;

    global $directory_browse_vars;

    if ( $bp->current_component == $bp->classifieds->slug

    && (empty( $bp->action_variable[0] )) //not a single classified

    && (!$bp->displayed_user->id)//we are not in someone profile

    )

    {

    $bp->is_directory = true;

    add_filter('bp_classifieds_query_status','bp_classifieds_query_filter_status_published');

    do_action( 'classifieds_directory_classifieds_setup' );

    echo "test-directory";

    bp_core_load_template( apply_filters( 'classifieds_template_directory_classifieds', 'directories/classifieds/index' ) );

    }

    }

    add_action( 'wp', 'classifieds_directory_classifieds_setup', 2 );

    “test directory” prints, so it enters the function; and my template files exist.

    But it seems that it doesn’t load properly as I stay on the main page and the bar adress even does not take the component slug.

    What could it be ?

    Thanks !

You must be logged in to reply to this topic.