1
votes

I am trying to use navigation api in sightly.

Following the link : navigation component using sightly

I am getting the list of pages,but ${item.type} is not working for me,thats why i am not able to apply proper DOM structure(html of the component). Can anyone please help me?

1
The Stack Overflow moderators won't like this one. Rather than creating a new question that just links to another question, you should up vote the original question and add a comment with additional details to help the community solve the question.nateyolles

1 Answers

1
votes

If you look at javadocs, navigation.getIterator() returns Navigation.Element, so the method returns iterator of Navigation.Element-

    public Iterator getNavigationIterator() {
     Navigation nav = new Navigation(getCurrentPage() , absParent , new PageFilter(getRequest()), 3);
     return nav.iterator();
}

The sightly expression will look something like -

<ul data-sly-list.navElement="${navitems.navigationIterator}">
    <li>
        ${navElement.type}
    </li>
</ul>