Using Content Query webpart to display item from link list. I have created template in ItemStyle.xsl stylesheet to change look and feel but i need last item should be View All item link.Need to show only 9 item(8 item+ view all link)

  • used below mentioned condition to solve issue using xsl test="count(preceding-sibling::*)=8" Nov 30, 2016 at 12:31

1 Answer 1


Add the following of code to Script Editor web part on the page:

<script src="//ajax.aspnetcdn.com/ajax/jquery/jquery-1.10.0.min.js"></script>
$("span[title='YOURWEBPARTITLE']").closest(".ms-webpart-chrome").find("ul").append("<a href='/Lists/YOURLIST/Forms/AllItems.aspx'>All items...</a>")

Where YOURWEBPARTITLE is the title of CQWP.


  • thanks jussi...i have used below mentioned code test="count(preceding-sibling::*)=8" Nov 30, 2016 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.