WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.7 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • New droplet: JumpToSib
  • Print
Pages: [1]   Go Down

Author Topic: New droplet: JumpToSib  (Read 4469 times)

Argos

  • Guest
New droplet: JumpToSib
« on: March 25, 2010, 05:59:05 PM »
Based on the JumpToChild droplet ( http://www.websitebakers.com/pages/droplets/official-library/navigation/jumptochild.php ) I created a JumpToSib droplet. It shows all sibling pages of the current page in a dropdown menu. I needed it for a project and thought others might find it useful too. Call it with [[jumptosib]]

Code: [Select]
ob_start();
echo'
 <form name="jump2all">
 <select name="select"
 onchange="javascript: window.location =
 this.options[this.selectedIndex].value;">
  <option value="" selected="">Make Your Choice</option>';  
show_menu2(0, SM2_CURR, SM2_CURR, SM2_ALL|SM2_CURRTREE, '<option value="[url]">[menu_title]</option>');
 echo'</select></form>';
 $content = ob_get_contents();
ob_end_clean();
return $content.' ';
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • New droplet: JumpToSib
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2