Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. First determine a directory name for your new theme inside the dspace-src/dspace/modules/xmlui/src/main/webapp
    Code Block
    /themes/
    directory; this name will be referenced as theme-dir in these instructions.
  2. Instead of starting your new theme completely from scratch, make a new copy of the standard theme template in a new directory, theme-dir.
    • First, build DSpace (
      Code Block
      mvn package
      ) if you haven't already
    • Code Block
      cd 
      dspace-src
      Code Block
      /dspace/target/dspace-[version]-build.dir/webapps/xmlui/themes/
    • Code Block
      cp -R template 
      theme-dir
  3. Next customize the theme's sitemap by specifying the theme's directory and name. Open, dspace-src/dspace/modules/xmlui/src/main/webapp/themes/theme-dir/sitemap.xmap, and edit the global variables shown below:
    • Code Block
       &lt;map<map:component-configurations&gt;configurations>
    • Code Block
          &lt;global-variables&gt;<global-variables>
    • Code Block
             &lt;theme-path&gt;<theme-path>
      theme-dir
      Code Block
      &lt;</theme-path&gt;path>
    • Code Block
             &lt;theme-name&gt;<theme-name>
      the name of your theme
      Code Block
      &lt;</theme-name&gt;name>
    • Code Block
          &lt;</global-variables&gt;variables>
    • Code Block
       &lt;</map:component-configurations&gt;configurations>
  4. Next customize the theme's CSS stylesheets, by default there are two style sheets used – a base version for all browsers and then a supplemental version just for Internet explorer.
  5. Perform the steps in Install+a+theme
  6. Perform the steps in Rebuild+DSpace

...

  • Hint #1: Add
    Code Block
    ?XML
    or
    Code Block
    &XML
    on the end of the URL to view the underlying XML for a given page.
  • Hint #2: Locate the appropriate
    Code Block
    &lt;xsl:template&gt;<xsl:template>
    to override in the
    Code Block
    dri2xhtml
    theme that comes with DSpace. The
    Code Block
    dri2xhtml
    theme includes 5 main XSLT files. The three with (default) next to them are the only ones used by default in DSpace.
  • Code Block
    DIM-Handler.xsl
    (default) = matches Item/Collection/Community METS files which contain DIM (DSpace Intermediate Metadata) format. (i.e. controls the display of all default metadata)
  • Code Block
    General-Handler.xsl
    (default) = matches the
    Code Block
    &lt;fileSec&gt;<fileSec>
    section of Item-level METS files (i.e. controls display of individual files/bitstreams)
  • Code Block
    MODS-Handler.xsl
    = matches Item/Collection/Community METS files which contain MODS metadata. (i.e. controls the display of all MODS metadata)
  • Code Block
    QDC-Handler.xsl
    = matches Item/Collection/Community METS files which contain Qualified Dublin Core metadata. (i.e. controls the display of all QDC metadata)
  • Code Block
    structural.xsl
    (default) = defines the layout / page structure for all of DSpace
  • Hint #3: There are a total of four metadata display "modes" used in DSpace. The
    Code Block
    &lt;xsl:template&gt;<xsl:template>
    tags in each of the
    Code Block
    *-Handler.xsl
    files are named after these "modes".
  • SummaryList = Summarized List of Objects
    • E.g. Community/Collection listing pages, item browsing/searching pages
  • SummaryView = Summarized View of a single Object
    • E.g. Item homepage (by default includes summarized metadata only)
  • DetailList = Detailed List of Objects
    • (Rarely used) E.g. The "item appears in the following collections" section on an Item's page is a DetailList of Collections, as it includes both collection names and brief descriptions
  • DetailView = Detailed View of a single Object
    • E.g. Item "full record" page, Collection/Community homepages