PDA

View Full Version : using navbits variables in plugin


30et
01-15-2010, 03:21 AM
Hi there
I am trying to access the navbits variables (the breadcrumb) in a plugin that I am creating.
I need to extract some of the data from it and output this data in some javascript.

I want to get each section of the breadcrumb trail into seperate javascript variables. I know that $navbits[lastelement] exists but I am not sure how to get other navbits.

If the breadcrumb was My Forum -> Cars -> Sedans, I would want something like

$myplugin = echo "<script type='text/javascript'>
var a = " . $navbits[firstelement] . ";
var b = ". $navbits[midelement] . ";
var c = " . $navbits[lastelement] ";
</script>";

How can I do get these navbits values in a plugin?