Reputation: 1
UniPager Pagination. Is it possible to put absolute links instead of relative ones in "PreviousGroupURL" and "NextGroupURL"?
My code:
<PreviousPageTemplate>
<a href="<%# URLHelper.GetAbsoluteUrl(Convert.ToString(Eval("PreviousURL", true))) %>" >Previous</a>
</PreviousPageTemplate>
<NextPageTemplate>
<a href="<%# URLHelper.GetAbsoluteUrl(Convert.ToString(Eval("NextURL", true)))%>">Next</a>
</NextPageTemplate>
<PreviousGroupTemplate>
<a href="<%# URLHelper.GetAbsoluteUrl(Convert.ToString(Eval("PreviousGroupURL", true))) %>">...</a>
</PreviousGroupTemplate>
<NextGroupTemplate>
<a href="<%# URLHelper.GetAbsoluteUrl(Convert.ToString(Eval("NextGroupURL", true)))%>">...</a>
</NextGroupTemplate>
HTML source page:
<a href="http://local/en/test">Previous</a>
<a href="/en/test">1</a>
<span>2</span>
<a href="/en/test?strona=3">3</a>
<a href="http://local/en/test?strona=3" >Next</a>
</div>
Upvotes: 0
Views: 68
Reputation: 6117
In your transformation use something like:
<%# GetAbsoluteUrl(Eval<string>("NextGroupURL")) %>
From https://devnet.kentico.com/docs/11_0/api/html/Methods_T_CMS_Helpers_URLHelper.htm
Upvotes: 0
Reputation: 61
Please refer below URLs - -
https://docs.xperience.io/k11/references/kentico-controls/generic-controls/paging-controls/unipager
https://devnet.kentico.com/questions/repeater-and-unipager-in-a-custom-control-(widget)
https://devnet.kentico.com/questions/kentico-unipager-not-working
Upvotes: -2