Sorting text link to "toggle" style?

Post Reply
Posts: 7
Joined: Fri May 27, 2016 12:44 pm

Sorting text link to "toggle" style?

Post by munoz »

I realized that a dropdown for sorting wasnt good.
So now I have a text button for the sorting

<xsl:element name="a" >
<xsl:attribute name="href">
<xsl:value-of select="OrderLink"/>
<xsl:value-of select="OrderType" class="button"/>

This displays a link to change the sorting style.
Is there a way to have both styles show, in my case "Sort by Date" and "Sort by Relevance", except one is a button to change, and the other is something static.

Similar to this style (The Toggle button version)? ... e-sort.png
User avatar
Site Admin
Posts: 347
Joined: Tue Oct 26, 2004 5:35 pm

Sorting text link to "toggle" style?

Post by jason112 »

You could do this by making a <form> element where the action is the OrderLink, and then you can make a submit button that submits the form.

Then you'd have a button that, when clicked, would change the sorting behavior.
User avatar
Site Admin
Posts: 5518
Joined: Tue Apr 25, 2000 6:56 pm

Sorting text link to "toggle" style?

Post by mark »

Or use an "if" similar to the one for the radio button discussed previously and create a stylized href for the active part and a stylized text for the inactive part.
Post Reply