Thanks for this snippet I finally managed to get it working, however I have a found a problem in IE, when I use the drop down list for jump instead of going to example:
www.mysite.com/cars/red-cars
its adds an extra directory and goes to:
www.mysite.com/cars/cars/red-cars
which does not exists. Anyway I can fix this? Its not happening in Firefox
must have to change something in this part of the code?
// Jump item
$PJN_jumpPlaceHolder =
'<form action="" name="jump1" style="display:inline;">'
. '<select name="myjumpbox" onchange="javascript:if (this.selectedIndex != 0) {var ops=this.getElementsByTagName(\'option\'); var url=ops[this.selectedIndex].getAttribute(\'value\'); if (url) {location.href=url;};}">'
. '<option selected="selected">'
. $jumpText
. '</option>';
foreach ($my_array as $my_page)
{
$PJN_jumpPlaceHolder .=
'<option value="[~'
. $my_page['id']
. '~]" >'
. $my_page['pagetitle']
. '</option>';
}
$PJN_jumpPlaceHolder .= '</select></form>';
// Index item
$PJN_indexPlaceHolder =
'<a href="[~'
. $indexDocumentID
. '~]">'
. $indexText
. '</a>';