On Thu, Jun 20, 2013 at 2:41 PM, "M. Àngels Pulido" <
[email protected]> wrote:

>  How I can remove the box "My Account" only from home? because I need it in
> other contexts ...
>

Usually, this would be as simple as this:

<xsl:template 
match="dri:list[@id='aspect.viewArtifacts.Navigation.list.account']">
  <xsl:if test="//dri:metadata[@element='request' and
@qualifier='URI']/text() != ''">
    <xsl:apply-templates />
  </xsl:if></xsl:template>


But in this case dri:list adds some formatting and here we're missing it
(because we're matching it and thus replacing its content). I found it
easier to recreate this particular content than to hunt for element we
missed:

<xsl:template 
match="dri:list[@id='aspect.viewArtifacts.Navigation.list.account']">
  <xsl:if test="//dri:metadata[@element='request' and
@qualifier='URI']/text() != ''">
    <xsl:variable name="authenticated"
select="/dri:document/dri:meta/dri:userMeta/@authenticated = 'yes'" />
    <h1 xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
class="ds-option-set-head"><i18n:text>xmlui.EPerson.Navigation.my_account</i18n:text></h1>
    <div id="aspect_viewArtifacts_Navigation_list_account"
class="ds-option-set">
      <ul class="ds-simple-list">
        <xsl:choose>
          <xsl:when test="$authenticated">
            <li><a
href="/logout"><i18n:text>xmlui.EPerson.Navigation.logout</i18n:text></a></li>
            <li><a
href="/profile"><i18n:text>xmlui.EPerson.Navigation.profile</i18n:text></a></li>
            <li><a
href="/submissions"><i18n:text>xmlui.Submission.Navigation.submissions</i18n:text></a></li>
          </xsl:when>
          <xsl:otherwise>
            <li><a
href="/login"><i18n:text>xmlui.EPerson.Navigation.login</i18n:text></a></li>
            <li><a
href="/register"><i18n:text>xmlui.EPerson.Navigation.register</i18n:text></a></li>
          </xsl:otherwise>
        </xsl:choose>
      </ul>
    </div>
  </xsl:if></xsl:template>


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
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

Reply via email to