0

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)

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

1 Answer 1

0

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>
<script>
$("span[title='YOURWEBPARTITLE']").closest(".ms-webpart-chrome").find("ul").append("<a href='/Lists/YOURLIST/Forms/AllItems.aspx'>All items...</a>")
</script>

Where YOURWEBPARTITLE is the title of CQWP.

Source

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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