Renders a navigation element and marks it as active where
 appropriate. See active_page? for details
775786
def nav(name, url, pages = nil, active = false)
      content_tag :li, link_to(name, url), :class => (active || (pages && active_page?(pages)) ? 'act' : nil)
    end
863314
function renderNav($prefix = '<span class="page_link">', $suffix = '</span>') {
        if ($this->total_rows == 0)
            return FALSE;
         
        $batch = ceil($this->page / $this->links_per_page );
        $end = $batch * $this->links_per_page;
        if ($end == $this->page) {
        //$end = $end + $this->links_per_page - 1;
        //$end = $end + ceil($this->links_per_page/2);
        }
        if ($end > $this->max_pages) {
            $end = $this->max_pages;
        }
        $start = $end - $this->links_per_page + 1;
        $links = '';
         
        for($i = $start; $i <= $end; $i ++) {
            if ($i == $this->page) {
                $links .= $prefix . " $i " . $suffix;                                       
            } else {
                $links .= " <a href='javascript:void(0);' OnClick='getdata( $i )' title='Outra página'>$i</a> ";
            }
        }
         
        return $links;
    }
742696
function onPagerendered(obj) {
        cache[obj.url] = {
            resource: obj.resource,
            time: Date.now()
        };

        //page render end
        trigger('onpagerendercomplete',{
            url : obj.url
        });
    }
124485
function() {

		if (Lava.schema.DEBUG) {

			for (var i = 0; i < this._count_arguments; i++) {

				this._arguments[i].isWaitingRefresh() && Lava.t("Rendering a view in dirty state");

			}

		}

		this._active_template = this._getActiveTemplate();
		return this._active_template ? this._active_template.render() : '';

	}
170787
def render_tag(self, context, caller, **kwargs):
        ''''''
        # load configuration from passed options
        self.load_configuration(**kwargs)

        # get request from context
        request = context['request']

        # get full path from request
        self.full_path = request.get_full_path()

        # render content of extension
        content = caller()

        # check content for "active" urls
        content = render_content(
            content,
            full_path=self.full_path,
            parent_tag=self.parent_tag,
            css_class=self.css_class,
            menu=self.menu,
            ignore_params=self.ignore_params,
        )

        return content
1208226
function() {
            var activeBtn = $( "." + $.mobile.activeBtnClass ).first();

            this.element
                .css({
                    top: $.support.scrollTop && this.window.scrollTop() + this.window.height() / 2 ||
                        activeBtn.length && activeBtn.offset().top || 100
                });
        }
77506
function links(options) {
    var page = this.page;

    return this.navigation.reduce(function reduce(menu, item) {
      if (page === item.page) item.class = (item.class || '') + ' active';

      if (item.class) item.class = ' class="' + item.class + '"';
      if (item.swap) item.swap = ' data-swap="' + item.swap.hide + '@' + item.swap.show + '"';
      if (item.effect) item.effect = ' data-effect="' + item.effect + '"';

      item.href = item.href || '#';
      return menu + options.fn(item);
    }, '');
  }
401631
public function renderPagetabEditionAction()
    {
		$idPage = $this->params()->fromRoute('idPage', $this->params()->fromQuery('idPage', ''));
    	$melisKey = $this->params()->fromRoute('melisKey', '');
    	
    	/**
         * Clearing the session data of the page in every open in page edition
         */
        $container = new Container('meliscms');
        if (!empty($container['content-pages']))
            if (!empty($container['content-pages'][$idPage]))
                $container['content-pages'][$idPage] = array();

        $melisCoreConf = $this->getServiceLocator()->get('MelisConfig');
        $resizeConfig   = $melisCoreConf->getItem('meliscms/conf')['pluginResizable'] ?? null;

    	$melisPage = $this->getServiceLocator()->get('MelisEnginePage');
    	$datasPage = $melisPage->getDatasPage($idPage, 'saved');
    	if($datasPage)
    	{
    	    $datasPageTree = $datasPage->getMelisPageTree();
         	$datasTemplate = $datasPage->getMelisTemplate();
    	}
    	
    	$this->loadPageContentPluginsInSession($idPage);  
    	
    	$view = new ViewModel();
    	$view->idPage = $idPage;
    	$view->melisKey = $melisKey;
    	$view->resizablePlugin = $resizeConfig;

    	if (empty($datasPageTree->page_tpl_id) || $datasPageTree->page_tpl_id == -1)
    	    $view->noTemplate = true;
    	else
    	    $view->noTemplate = false;
    	
    	if(!empty($datasTemplate))
            $view->namespace = $datasTemplate->tpl_zf2_website_folder;
    	else 
    	    $view->namespace = '';
    	
    	return $view;
    }
635372
def nav_li *args, &block
      options = (block_given? ? args.first : args.second) || {}
      url = url_for(options)
      active = "active" if url == request.path || url == request.url
      content_tag :li, :class => active do
        link_to *args, &block
      end
    end
1228910
def get_navigation(self, request, **kwargs):
        

        if self.navigation == self.parent_attr:
            if self.parent:
                return self.parent.get_navigation(request, **kwargs)
            return ()
        else:
            return self._nav_from_tuple(request, self.navigation,
                                **kwargs)
836809
public function renderNav($numberOfPages, $currentPage = 1, $queryParameters = array(), $maxPagesDisplayedAroundCurrent = 2)
    {
        $navigation = array();

        $firstPageDisplayed = 1;
        $lastPageDisplayed = (int)$numberOfPages;

        $leftPartUrl = $this->prepareQueryString($queryParameters);

        if ($currentPage > $maxPagesDisplayedAroundCurrent) {
            $firstPageDisplayed = $currentPage - $maxPagesDisplayedAroundCurrent;
            $navigation[] = '<a href="' . $leftPartUrl . '1" class="navigatorShortcut1">'
                . $this->translator->trans('open_orchestra_display.twig.navigator.first')
                . '</a>';
        }

        if ($currentPage > 1) {
            $navigation[] = '<a href="' . $leftPartUrl . ($currentPage - 1) . ' "class="navigatorShortcut2">'
                . $this->translator->trans('open_orchestra_display.twig.navigator.previous')
                . '</a>';
        }

        if ($firstPageDisplayed > 1) {
            $navigation[] = '...';
        }

        if ($currentPage < $numberOfPages - $maxPagesDisplayedAroundCurrent) {
            $lastPageDisplayed = $currentPage + $maxPagesDisplayedAroundCurrent;
        }

        for ($i = $firstPageDisplayed; $i <= $lastPageDisplayed; $i++) {
            if ($i == $currentPage) {
                $navigation[] = '<span class="navigatorCurrent">' . $i . '</span>';
            } else {
                $navigation[] = ' <a href="' . $leftPartUrl . $i . '" class="navigatorPage">' . $i . '</a>';
            }
        }

        if ($lastPageDisplayed < $numberOfPages) {
            $navigation[] = '...';
        }

        if ($currentPage < $numberOfPages) {
            $navigation[]= '<a href="' . $leftPartUrl . ($currentPage + 1) . '" class="navigatorShortcut2">'
                . $this->translator->trans('open_orchestra_display.twig.navigator.next')
                . '</a>';
        }

        if ($currentPage < $numberOfPages - $maxPagesDisplayedAroundCurrent) {
            $navigation[]= '<a href="' . $leftPartUrl . $numberOfPages . '" class="navigatorShortcut1">'
                . $this->translator->trans('open_orchestra_display.twig.navigator.last')
                . '</a>';
        }

        return implode(' ', $navigation);
    }
810083
public function render() {

		// check authentication

		if(!$this->authenticateMenu($this->menu)) {
			return '';
		}

		$request = Request::createFromGlobals();
		
		// if menu has not been prepared yet, do it now (caching avoids re-parsing for submenus)

		if(!in_array($this->menu, self::$primedMenus, true)) {

			// clear selected menu entries (which remain in the session)

			$this->clearSelectedMenuEntries($this->menu);

			// walk entire menu and add dynamic entries where necessary
			
			$this->completeMenu($this->menu);
			
			// prepare path segments to identify active menu entries

			$this->pathSegments = explode('/', trim($request->getPathInfo(), '/'));

			// skip script name

			if($this->rewriteActive && basename($request->getScriptName()) != 'index.php') {
				array_shift($this->pathSegments);
			}

			// skip locale if one found

			if(count($this->pathSegments) && Application::getInstance()->hasLocale($this->pathSegments[0])) {
				array_shift($this->pathSegments);
			}

			// walk tree until an active entry is reached

			$this->walkMenuTree($this->menu, (!count($this->pathSegments) || $this->pathSegments[0] === '') ? explode('/', $this->route->getPath()) : $this->pathSegments);

			// cache menu for multiple renderings

			self::$primedMenus[] = $this->menu;
		}

		$htmlId = $this->id . 'menu';

		// drill down to required submenu (if only submenu needs to be rendered)

		$m = $this->menu;

		if($this->level !== false) {

			$htmlId .= '_level_' . $this->level;

			if($this->level > 0) {

				while($this->level-- > 0) {
					$e = $this->menu->getSelectedEntry();
					if(!$e || !$e->getSubMenu()) {
						break;
					}
					$m = $e->getSubMenu();
				}

				if($this->level >= 0) {
					return '';
				}

			}
		}

		// output

		// instantiate renderer class, defaults to SimpleListRenderer

		if(!empty($this->decorator)) {
			$rendererName = $this->decorator;
		}
		else {
			$rendererName = 'SimpleList';
		}

		$className = __NAMESPACE__ . '\\Menu\\Renderer\\' . $rendererName . 'Renderer';

		$renderer = new $className($m);
		$renderer->setParameters($this->renderArgs);

		// enable or disable display of submenus

		$m->setShowSubmenus($this->level === false);

		// enable or disable always active menu

		$m->setForceActive(self::$forceActiveMenu);

		// if no container tag was specified, use a DIV element

		if(!isset($this->renderArgs['containerTag'])) {
			$this->renderArgs['containerTag'] = 'div';
		}

		// omit wrapper, if a falsy container tag was specified

		if($this->renderArgs['containerTag']) {
			return sprintf(
				'<%1$s%2$s>%3$s</%1$s>',
				$this->renderArgs['containerTag'],
				(isset($this->renderArgs['omitId']) && $this->renderArgs['omitId']) ? '' : (' id="' . $htmlId . '"'),
				$renderer->render()
			);
		}

		return $renderer->render();

	}
578718
def navigation(self):
        """"""
        return self.on_site().filter(
            status=self.model.PUBLISHED).filter(parent__isnull=True)
383519
function render() {
      var checked = rgCtrl.getViewValue() == attr.value;

      if (checked === lastChecked) return;

      if (element[0].parentNode.nodeName.toLowerCase() !== 'md-radio-group') {
        // If the radioButton is inside a div, then add class so highlighting will work
        element.parent().toggleClass(CHECKED_CSS, checked);
      }

      if (checked) {
        rgCtrl.setActiveDescendant(element.attr('id'));
      }

      lastChecked = checked;

      element
        .attr('aria-checked', checked)
        .toggleClass(CHECKED_CSS, checked);
    }
866101
function() {
        var d = this.panel_div; // "this" refers to a control on panel!
        var re = new RegExp("\\b(" + this.displayClass + "Item)Inactive\\b");
        d.className = d.className.replace(re, "$1Active");
    }
180865
def render(self, parsed, page=False, minify=False):
        
        rendered = []
        for i, p in enumerate(parsed):
            if i == 0:
                settings = p.get("settings", {})
                self.direction = settings.get("direction", DEFAULT_DIR)
                self.lang = settings.get("lang", DEFAULT_LANG)
            rendered.append(self.render_ents(p["text"], p["ents"], p.get("title")))
        if page:
            docs = "".join([TPL_FIGURE.format(content=doc) for doc in rendered])
            markup = TPL_PAGE.format(content=docs, lang=self.lang, dir=self.direction)
        else:
            markup = "".join(rendered)
        if minify:
            return minify_html(markup)
        return markup
1051489
def render_applicationNavigation(self, ctx, data):
        
        if self.username is None:
            return ''
        translator = self._getViewerPrivateApplication()
        return applicationNavigation(
            ctx,
            translator,
            translator.getPageComponents().navigation)