Skip to:
Content
Pages
Categories
Search
Top
Bottom

creating component pages

  • @mattkern

    Participant

    Hello All

    I am digging into the skeleton component and a few others to see how they tick.

    One thing I am getting stuck on is how to make a main component page. for example, with the events plugin that aggregates all events from accross the site on a single page.

    I got the link to appear in the main nav bar (with the deprecated bp_nav (or whatever it is called) but when I click on that link, it does not go to a page I am expecting.

    Does that make sense?

    Thanks

    Matt

Viewing 7 replies - 1 through 7 (of 7 total)
  • @mattkern

    Participant

    I am sure I can go into template mode and create a page that way, but I would like to make it so if someone installs the plugin, the main aggregating page shows up automagically.

    I am working on a video component. Basically just stole the picture component and am migrating it over to accept video embed code. No uploads.

    I haven’t seen anyone working on one so I thought I would take a shot at it.

    @djpaul

    Keymaster

    Show us your code, and also let us know if you’re building this on BP 1.0.3 or BP 1.1/trunk. Because the way to do this has changed in 1.1/trunk.

    @mattkern

    Participant

    hey Paul,

    I don’t really have code at this point. The only code I have is for the member pages, not the main page.

    I basically got the slug working with bp_nav_bar and that was it.

    I am using BP 1.0.3

    @johnjamesjacoby

    Keymaster

    Matt, does the other post I just stickied answer this for you?

    @mattkern

    Participant

    Well, actually. No… haha

    Its good info and it will definitely be used but my actual question here was how to make that main page without having to add it to the themes folder.

    Like how the events plugin adds all its files to the bp-themes folder.

    I guess it doesn’t matter which directory we add the files to but all the plugins I have seen are adding the files to the bp-themes directory so I guess I am just wanting to be a sheeple on this topic.

    After reading your last post, it seems like I am looking for something like this:

    bp_member_load_template( ‘fun’, true );

    does anything like that exist? I am looking thru the event code but there is quite a lot of it so its slow going.

    @djpaul

    Keymaster

    At the moment the pages have to be moved into the theme folder.

    If you’re trying to get it so a user doesn’t have to move your page files into their theme when they’ve installed your plugin, have a look at https://trac.buddypress.org/ticket/954.

    The function which tells BuddyPress to load a particular theme file is like this:

    bp_core_load_template( 'achievements-member-theme/summary' );

    @mattkern

    Participant

    Cool, thanks DJPaul

    I will check that out.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘creating component pages’ is closed to new replies.
Skip to toolbar