2015-11-05 113 views
0

我有此網站http://sds-test.nowcommu.myhostpoint.ch/de(請使用「de」結尾),導航「RECHENZENTRUM」的最後一個鏈接不適用於桌面,但適用於移動設備。我如何解決它?這是樹枝代碼:導航鏈接適用於移動電話,但不適用於臺式電腦

{% extends 'partials/base.html.twig' %} 

{% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %} 
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %} 

{% block javascripts %} 
{% if show_onpage_menu %} 
    {% do assets.add('theme://js/singlePageNav.min.js') %} 
{% endif %} 
{{ parent() }} 
{% endblock %} 


{% block bottom %} 
{{ parent() }} 
{% if show_onpage_menu %} 
    <script> 
    // singlePageNav initialization & configuration 
    $('#navbar').singlePageNav({ 
     offset: $('#header').outerHeight(), 
     filter: ':not(.external)', 
     updateHash: true, 
     currentClass: 'active' 
    }); 
    </script> 
{% endif %} 
{% endblock %} 

{% block header_navigation %} 
{% if show_onpage_menu %} 
    <ul class="navigation"> 
    {% for module in page.collection() %} 
     {% set current_module = (module.active or module.activeChild) ? 'active' : '' %} 
     <li class="{{ current_module }}"><a href="#{{ _self.pageLinkName(module.menu) }}">{{ module.menu }}</a></li> 
    {% endfor %} 
     {% set datacenter_page = page.find('/services/datacenter') %} 
<li><a href ="{{ datacenter_page.url() }}">{{ datacenter_page.menu() }}</a></li> 
    </ul> 
{% else %} 
    {{ parent() }} 
{% endif %} 
{% endblock %} 

{% block content %} 
{{ page.content }} 
{% for module in page.collection() %} 
    <div id="{{ _self.pageLinkName(module.menu) }}"></div> 
    {{ module.content }} 
{% endfor %} 
{% endblock %} 

回答

0

的「rechenzentrum」鏈接正確地呈現,並通過複製右鍵單擊鏈接位置讓打開一個看似正確的頁面正確的URL。所以模板渲染很好。

雖然鏈接有兩個onclick處理程序附加到它。可能其中一個失敗,從而阻止導航。 (JS被縮小了,所以我沒有嘗試調試它。)

+0

現在應該沒有縮小。 – Eloyen

+0

現在它要求輸入密碼:) – 9000

相關問題