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 Answer
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.
-
thanks jussi...i have used below mentioned code test="count(preceding-sibling::*)=8" Commented Nov 30, 2016 at 12:30