Sorting text link to "toggle" style?

Post Reply
munoz
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

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

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)?
http://www.uxcentral.com/wp-content/upl ... e-sort.png
User avatar
jason112
Site Admin
Posts: 344
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
mark
Site Admin
Posts: 5504
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