Page 1 of 1

Sorting text link to "toggle" style?

Posted: Mon Jun 13, 2016 3:21 pm
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

Sorting text link to "toggle" style?

Posted: Mon Jun 13, 2016 4:04 pm
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.

Sorting text link to "toggle" style?

Posted: Mon Jun 13, 2016 4:54 pm
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.