Well I was hoping someone would post a shorttag that I could use but I just wrote a PHP script to achieve the results I was looking for. Just in case someone else is looking to do the same here is the script I used:
<?php
// Set id based on pagetitle or url for BP pages.
$url = $_SERVER;
$pagetitle = wp_title("","0");
$pagetitle = strtolower(str_replace(' ', '', ltrim($pagetitle)));
if (strlen($pagetitle) == 0 && $url == '/sbs/groups/') {
$pagetitle = 'groups';
} elseif (strlen($pagetitle) == 0 && $url == '/sbs/forums/') {
$pagetitle = 'forum';
} elseif (strlen($pagetitle) == 0 && $url == '/sbs/') {
$pagetitle = 'home';
}
?>
How it works: It will take the pagetitle and strip it down into a web standards friendly id and insert it into the tag. If the page does not have a pagetitle set, like for example like the forums and groups pages in Buddypress then it will set a id based on the URL.
So to insert the custom body tag id you put in <body id="">
Hope this helps someone.
Why would you want to set a body ID?
Wouldn’t you want to set the title?
`
my buddypress title`
My problem is that no matter where I am in forums and conversations, the page title is always just Groups.