Difference between revisions of "SUNScholar/XMLUI Theme/M1/Creation"

From Libopedia
Jump to navigation Jump to search
m (Text replacement - "dspace-1.8.2-src-release" to "source")
Line 6: Line 6:
  
 
The default folder is:
 
The default folder is:
  /home/dspace/dspace-1.8.2-src-release/dspace/modules/xmlui/src/main/webapp/themes/[custom-theme-dir]
+
  /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/[custom-theme-dir]
  
 
You can replace "Mytheme" with a theme name of your choice for all of the following instructions.
 
You can replace "Mytheme" with a theme name of your choice for all of the following instructions.
Line 13: Line 13:
 
Type the following to create your own custom theme folder and files using the reference "Mirage" theme.
 
Type the following to create your own custom theme folder and files using the reference "Mirage" theme.
 
   
 
   
  mkdir /home/dspace/dspace-1.8.2-src-release/dspace/modules/xmlui/src/main/webapp/themes
+
  mkdir /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes
  
  mkdir /home/dspace/dspace-1.8.2-src-release/dspace/modules/xmlui/src/main/webapp/themes/Mytheme
+
  mkdir /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme
  
  cd /home/dspace/dspace-1.8.2-src-release/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/themes
+
  cd /home/dspace/source/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/themes
  
  cp -R Mirage /home/dspace/dspace-1.8.2-src-release/dspace/modules/xmlui/src/main/webapp/themes/Mytheme
+
  cp -R Mirage /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme
 
----
 
----
 
;Step 2 - Modify the "xmlui.xconf" file to use "Mytheme"
 
;Step 2 - Modify the "xmlui.xconf" file to use "Mytheme"
 
Type the following to go to your DSpace config directory.
 
Type the following to go to your DSpace config directory.
  cd /home/dspace/dspace-1.8.2-src-release/dspace/config
+
  cd /home/dspace/source/dspace/config
 
Type the following to edit the DSpace XMLUI config file.
 
Type the following to edit the DSpace XMLUI config file.
 
  nano xmlui.xconf
 
  nano xmlui.xconf
Line 37: Line 37:
 
Type the following to change directory to the "Mytheme" folder.
 
Type the following to change directory to the "Mytheme" folder.
  
  cd /home/dspace/dspace-1.8.2-src-release/dspace/modules/xmlui/src/main/webapp/themes/Mytheme
+
  cd /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme
  
 
Modify the '''sitemap.xmap''' config file for your new theme by typing the following.
 
Modify the '''sitemap.xmap''' config file for your new theme by typing the following.
Line 58: Line 58:
 
;Step 4 - Rename the "Mirage.xsl" file to "Mytheme.xsl"
 
;Step 4 - Rename the "Mirage.xsl" file to "Mytheme.xsl"
 
Type the following.
 
Type the following.
  cd /home/dspace/dspace-1.8.2-src-release/dspace/modules/xmlui/src/main/webapp/themes/Mytheme
+
  cd /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme
 
Rename the "Mirage.xsl" file to "Mytheme.xsl" by typing the following.
 
Rename the "Mirage.xsl" file to "Mytheme.xsl" by typing the following.
 
  mv Mirage.xsl Mytheme.xsl
 
  mv Mirage.xsl Mytheme.xsl
  
 
  '''[[SUNScholar/XMLUI_Theme|Back to Theme]]'''
 
  '''[[SUNScholar/XMLUI_Theme|Back to Theme]]'''

Revision as of 10:43, 9 December 2013

Template:SUNScholar

Replace all instances of XXX with the DSpace version number selected for installation.

We will be using the "modules" overlay method to create a custom theme.

The default folder is:

/home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/[custom-theme-dir]

You can replace "Mytheme" with a theme name of your choice for all of the following instructions.


Step 1 - Copy the "Mirage" reference theme to a custom "Mytheme"

Type the following to create your own custom theme folder and files using the reference "Mirage" theme.

mkdir /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes
mkdir /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme
cd /home/dspace/source/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/themes
cp -R Mirage /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme

Step 2 - Modify the "xmlui.xconf" file to use "Mytheme"

Type the following to go to your DSpace config directory.

cd /home/dspace/source/dspace/config

Type the following to edit the DSpace XMLUI config file.

nano xmlui.xconf

Add the following to "xmlui.xconf" file in the themes section using copy and paste with firefox and nano. Make sure to comment out all other theme references !!

<theme name="Mytheme" path="Mytheme/" regex=".*" />

NANO Editor Help
CTL+O = Save the file and then press Enter
CTL+X = Exit "nano"
CTL+K = Delete line
CTL+U = Undelete line
CTL+W = Search for %%string%%
CTL+\ = Search for %%string%% and replace with $$string$$
CTL+C = Show line numbers

More info = http://en.wikipedia.org/wiki/Nano_(text_editor)



Step 3 - Modify the "sitemap.xmap" file to use "Mytheme"

Type the following to change directory to the "Mytheme" folder.

cd /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme

Modify the sitemap.xmap config file for your new theme by typing the following.

nano sitemap.xmap

Change the "theme-path" and "theme-name" parameters in the sitemap.xmap file using the "nano" editor.

<map:component-configurations>
    <global-variables>
       <theme-path>Mytheme</theme-path>
       <theme-name>Mytheme</theme-name>
    </global-variables>
</map:component-configurations>

NANO Editor Help
CTL+O = Save the file and then press Enter
CTL+X = Exit "nano"
CTL+K = Delete line
CTL+U = Undelete line
CTL+W = Search for %%string%%
CTL+\ = Search for %%string%% and replace with $$string$$
CTL+C = Show line numbers

More info = http://en.wikipedia.org/wiki/Nano_(text_editor)



Step 4 - Rename the "Mirage.xsl" file to "Mytheme.xsl"

Type the following.

cd /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme

Rename the "Mirage.xsl" file to "Mytheme.xsl" by typing the following.

mv Mirage.xsl Mytheme.xsl
Back to Theme