Hi,
We're wanting to put in some javascript for an accordion menu on our Dspace
installation. The code works if I reference it in the theme's sitemap.xmap
file, but I wanted to only have the accordion functionality on the
community page (http://mydomain/handle/120320131/1). I found this reference:
http://www.mail-archive.com/[email protected]/msg13587.html
That looked promising, and accordingly I set up an xhtml file only
containing the script reference:
<script type="text/javascript" src="/ccn/themes/Mirage/lib/js/ccn.js">
</script>
However, I'm not sure where to put the reference, or if the xhtml can work
this way. I tried putting it in core/page-structure.xsl right after the
reference to the Modernizr script, like so:
<xsl:value-of
select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='theme'][@qualifier='path']"/>
<xsl:text>/lib/js/modernizr-1.7.min.js</xsl:text>
</xsl:attribute> </script>
<!--test for conditional accordion menu-->
<xsl:choose>
<xsl:when
test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='title']/i18n:text='xmlui.general.dspace_home'">
<xsl:copy-of select="document('../../static/accordion.xhtml')"/>
</xsl:when>
<xsl:otherwise>
<!-- Do nothing, since only homepage gets special content -->
</xsl:otherwise>
</xsl:choose>
but the script reference doesn't show up in the source code. If I put the
reference in the otherwise condition, the reference shows in source, but
the accordion functionality doesn't work.
Could someone please give a pointer as to what I should do in terms of
match and if I set up the reference properly to the script?
Thanks,
Charlene
--
Charlene Barina, MPH
Research Coordinator, US IMPACT Study
The Information School
303-359-6347 | Skype: cbarina
facebook.com/ImpactSurvey | twitter.com/impactsurvey
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette