사용자 정의 메뉴 템플릿에서 선택한 페이지를 표시하는 방법은 무엇입니까?

StackOverflow https://stackoverflow.com//questions/24010805

문제

DDR 메뉴 토큰 템플릿을 사용하여 DNN에서 내 사용자 정의 메뉴를 작성하고 있습니다.

내 메뉴에서 현재 선택한 페이지의 메뉴 링크를 원합니다.Token [SELECTED]를 사용 하여이 작업을 수행 할 수 있습니다.그러나 제 2 단계 또는 3 번째 계층 페이지에있을 때마다 링크가 선택되지 않았습니다.어린이 페이지에있는 경우에도 상위 페이지 링크가 선택되도록 코드를 작성하려면 어떻게해야합니까?

이것은 내 코드

입니다

[>NODE-TOP]
<li class="[?NODE]dropdown[/?][?SELECTED] current active[/?]">
    [?ENABLED]
        <a class="dropdown-toggle forcelink" data-toggle="dropdown" data-hover="dropdown" data-delay="300" href="[=URL]">[=TEXT]<span class="[?NODE]caret[/?]"></a>
    [/?]
    [?NODE]
        <ul class="dropdown-menu">
            [*>NODE]
        </ul>
    [/?]
</li>
[/>]
[>NODE]
<li class="dropdown-submenu">
    [?ENABLED]
            <a href="[=URL]">[=TEXT]<span class="[?NODE]caret-right[/?]"></a>
    [/?]
    [?NODE]
        <ul class="dropdown-menu">
            [*>NODE]
        </ul>
    [/?]
</li>
[/>]
.

여기에 DDRMENU에 사용할 수있는 일부 토큰이 있습니다.

NODE - A page
ID - The page ID
TEXT - The page name (i.e. what should normally be displayed in the menu)
TITLE - The full page title
URL - The page URL
ENABLED - Whether the page is enabled
SELECTED - Whether the page is selected
BREADCRUMB - Whether the page is in the current breadcrumb
SEPARATOR - Whether the node is a separator
ICON - The URL of the page icon
LARGEIMAGE - The URL of the large page icon (DNN 6 only)
FIRST - Whether the page is the first in its level
LAST - Whether the page is the last in its level
ONLY - Whether the page is the only one in its level
DEPTH - The depth of the current page in the menu structure (starting at 0)
TARGET - The target window for the url defined for the page (_new or null)
KEYWORDS - The keywords defined for the current page
DESCRIPTION - The description of the current page
TARGET - The target property is used to identify the browser window.
.

도움이 되었습니까?

해결책

코드는 낮은 수준에서 선택한 테스트가 아닙니다.이는 [> 노드]로 시작하는 섹션에 있습니다.

빵 부스러기 트레일의 모든 페이지에 대해서는 true가 될 것입니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top