Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I modify the markup generated by a Wicket link in a PagingNavigator?
    text
    copied!<p>I'm using a customized PagingNavigator component, and I'm looking for a way to change markup generated for the first, previous, and current page paging items.</p> <p>Here's my PaginingNavigator:</p> <pre><code> &lt;wicket:panel&gt; &lt;ul class="pagination"&gt; &lt;li class="first"&gt; &lt;a wicket:id="first"&gt;&amp;lt;&amp;lt;&lt;/a&gt; &lt;/li&gt; &lt;li class="prev"&gt; &lt;a wicket:id="prev"&gt;&amp;#060;&lt;/a&gt; &lt;/li&gt; &lt;li wicket:id="navigation" class="page"&gt; &lt;a wicket:id="pageLink" href="#"&gt; &lt;span wicket:id="pageNumber"&gt;5&lt;/span&gt; &lt;/a&gt; &lt;/li&gt; &lt;li class="dots"&gt;...&lt;/li&gt; &lt;li wicket:id="lastPage" class="jump"&gt;&lt;/li&gt; &lt;li class="next"&gt; &lt;a wicket:id="next"&gt;&amp;#062;&lt;/a&gt; &lt;/li&gt; &lt;li class="last"&gt; &lt;a wicket:id="last"&gt;&amp;gt;&amp;gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p></p> <p>The markup generated within the LIs of inactive items (initially, the previous, first, and current page) is this:</p> <pre><code>&lt;span title="Item Title" id="RandomID"&gt; &lt;em&gt; &lt;span&gt;ItemText&lt;/span&gt; &lt;/em&gt; &lt;/span&gt; </code></pre> <p>This makes it pretty difficult to style the content of inactive paging items and the current page differently. I'd prefer it to output something like this for the inactive items:</p> <pre><code>&lt;a href="#" title=ItemTitle" id="RandomID" class="inactive"&gt;ItemText&lt;/a&gt; </code></pre> <p>and this for the current page:</p> <pre><code> &lt;a href="#" title=ItemTitle" id="RandomID" class="currentPage"&gt;ItemText&lt;/a&gt; </code></pre> <p>I also noticed that it inserts SPAN tags into the A tags when you start paging through results, and since these don't have particular classes on them, it gets pretty tedious to style correctly.</p> <p>I've been digging around in our codebase and can't find anywhere that we'd be specifying this, but since I'm a front-end guy, it'd be pretty easy for me to overlook. They seem to be standard PagingNavigationLinks, as far as I can tell.</p> <p>Any ideas?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload