/** {@inheritdoc} */
 public function render($content)
 {
     $element = $this->getElement();
     $view = $element->getView();
     if (null === $view) {
         return $content;
     }
     $placement = $this->getPlacement();
     $separator = $this->getSeparator();
     $attr = array('onchange' => '$(this).prev().val(this.value.split("|")[1]); this.selectedIndex = 0;');
     $options = array('' => 'Select page...');
     foreach (PageQuery::create()->orderByBranch()->find() as $page) {
         if (Curry_Backend_Page::isTemplatePage($page)) {
             continue;
         }
         $options[$page->getPageId() . '|' . $page->getUrl()] = str_repeat(" ", $page->getLevel() * 3) . $page->getName();
     }
     $options = Html::createSelectOptions($options, '');
     $markup = Html::tag('select', $attr, $options);
     switch ($placement) {
         case 'PREPEND':
             $content = $markup . $separator . $content;
             break;
         case 'APPEND':
         default:
             $content = $content . $separator . $markup;
     }
     return $content;
 }