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 - on
the browser it looks like this:
Sort by: Sort By: deposit date issue date title
On Wed, Oct 10, 2012 at 12:30 PM, Jose Blanco <[email protected]> wrote:
> Actually, I just noticed, it's not quite showing the select widget, it
> shows the selection choices but not the widget. Going to keep looking.
> Very close now.
>
>
> On Wed, Oct 10, 2012 at 12:15 PM, Jose Blanco <[email protected]> wrote:
>
>> This worked with a few exception.
>>
>> (1)I had to get rid of
>> <xsl:apply-templates />
>>
>> because it was putting extra stuff by the label.
>> (2)
>> It complaint about "for" - I think it need to make a it an attribute
>> using xslt.
>>
>> (3) I have one more question. How did you come up with the path
>> match="dri:field[@id='aspect.
>>>
>>> artifactbrowser.ConfigurableBrowse.field.sort_by']
>>
>>
>> Doesn't it have to be more precise, like this one I just found in another
>> xslt file
>>
>> <xsl:template match="dri:div[@n='item-view']/dri:head" priority="5">
>> item-view.xsl
>>
>> Or it does not have to have the full path and will look for the field in
>> the entire xml file?
>>
>>
>> On Wed, Oct 10, 2012 at 11:20 AM, helix84 <[email protected]> wrote:
>>
>>> I haven't tested it, but try this:
>>>
>>> Add this new template to any .xsl stylesheet in your theme (I use the
>>> themename.xsl file):
>>>
>>> <xsl:template name="add_label-sort_by"
>>>
>>> match="dri:field[@id='aspect.artifactbrowser.ConfigurableBrowse.field.sort_by']">
>>> <label for=\"sort_by\" style=\"display:none\">Sort By:</label>
>>> <xsl:apply-templates />
>>> </xsl:template>
>>>
>>> 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.
>>>
>>> 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