On Wed, Oct 10, 2012 at 7:19 PM, Jose Blanco <[email protected]> wrote:
> helix, after experimenting with this a bit more, I see that if I leave out
> the apply-template, the label completely replaces the select, but if I leave
> it in, the select widget is removed and the options are output

Yes, just like I wrote here:

On Wed, Oct 10, 2012 at 5:20 PM, helix84 <[email protected]> wrote:
> Notice that the apply-templates call inserts what would normally be
> inserted there and we insert the label BEFORE the contents. If you
> leave out apply-templates, you will REPLACE the contents with the
> label. Try both, just to see what it does.



> - on the
> browser it looks like this:
>
> Sort by: Sort By: deposit date issue date title

It's possible that by overriding match="dri:field" with a more
specific template match="dri:field[@id='something']" we probably lost
the part of HTML output where the <select> tag is generated.

You didn't say which template your template is based on. Look up
<xsl:template match="dri:field"> in it and use its contents in your
template.

Alternatively, you can simplify it with something like this (wrapping
the contents into "select" tags, this should give you the idea):

<xsl:template name="add_label-sort_by"
match="dri:field[@id='aspect.artifactbrowser.ConfigurableBrowse.field.sort_by']">
    <label>
        <xsl:attribute name="for">sort_by</xsl:attribute>
        <xsl:attribute name="style">display:none</xsl:attribute>
        Sort By:
    </label>
    <select>
        <xsl:apply-templates />
    </select>
</xsl:template>

Regards,
~~helix84

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to