Difference between revisions of "SUNScholar/XMLUI Theme/M1/Creation"
m |
|||
| Line 12: | Line 12: | ||
'''<font color="red">We will be using the "modules" overlay method to create a custom theme.</font>''' | '''<font color="red">We will be using the "modules" overlay method to create a custom theme.</font>''' | ||
| − | You can replace " | + | You can replace "SUNScholar" with a theme name of your choice for all of the following instructions. |
| − | ==Step 1 - Copy the "Mirage" reference theme to a custom " | + | ==Step 1 - Copy the "Mirage" reference theme to a custom "SUNScholar"== |
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/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/modules/xmlui/src/main/webapp/themes | mkdir $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/modules/xmlui/src/main/webapp/themes | ||
| − | mkdir $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/modules/xmlui/src/main/webapp/themes/ | + | mkdir $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/modules/xmlui/src/main/webapp/themes/SUNScholar |
cd $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace-xmlui/src/main/webapp/themes | cd $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace-xmlui/src/main/webapp/themes | ||
| Line 26: | Line 26: | ||
cd $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/modules/xmlui/src/main/webapp/themes | cd $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/modules/xmlui/src/main/webapp/themes | ||
| − | mv Mirage | + | mv Mirage SUNScholar |
| − | ==Step 2 - Modify the "xmlui.xconf" file to use " | + | ==Step 2 - Modify the "xmlui.xconf" file to use "SUNScholar"== |
Type the following to go to your DSpace config directory. | Type the following to go to your DSpace config directory. | ||
cd $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/config | cd $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/config | ||
| Line 36: | Line 36: | ||
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 !!''' | 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 !!''' | ||
<pre> | <pre> | ||
| − | <theme name=" | + | <theme name="SUNScholar" regex=".*" path="SUNScholar/" /> |
</pre> | </pre> | ||
{{NANO}} | {{NANO}} | ||
| − | ==Step 3 - Modify the "sitemap.xmap" file to use " | + | ==Step 3 - Modify the "sitemap.xmap" file to use "SUNScholar"== |
| − | Type the following to change directory to the " | + | Type the following to change directory to the "SUNScholar" folder. |
| − | cd $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/modules/xmlui/src/main/webapp/themes/ | + | cd $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/modules/xmlui/src/main/webapp/themes/SUNScholar |
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 55: | Line 55: | ||
<map:component-configurations> | <map:component-configurations> | ||
<global-variables> | <global-variables> | ||
| − | <theme-path> | + | <theme-path>SUNScholar</theme-path> |
| − | <theme-name> | + | <theme-name>SUNScholar</theme-name> |
</global-variables> | </global-variables> | ||
</map:component-configurations> | </map:component-configurations> | ||
| Line 62: | Line 62: | ||
{{NANO}} | {{NANO}} | ||
| − | ==Step 4 - Rename the "Mirage.xsl" file to " | + | ==Step 4 - Rename the "Mirage.xsl" file to "SUNScholar.xsl"== |
Type the following. | Type the following. | ||
| − | cd $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/modules/xmlui/src/main/webapp/themes/ | + | cd $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/modules/xmlui/src/main/webapp/themes/SUNScholar |
| − | Rename the "Mirage.xsl" file to " | + | Rename the "Mirage.xsl" file to "SUNScholar.xsl" by typing the following. |
| − | mv Mirage.xsl | + | mv Mirage.xsl SUNScholar.xsl |
Revision as of 13:33, 27 May 2015
Back to Mirage 1
Contents
Requirements
Please see: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Install_DSpace/S03
Make sure you have correctly "symlinked" to the source code, see step 3.2 in the link above.
The default folder is:
$HOME/source/dspace/modules/xmlui/src/main/webapp/themes/[custom-theme-dir]
- Method
We will be using the "modules" overlay method to create a custom theme.
You can replace "SUNScholar" with a theme name of your choice for all of the following instructions.
Step 1 - Copy the "Mirage" reference theme to a custom "SUNScholar"
Type the following to create your own custom theme folder and files using the reference "Mirage" theme.
mkdir $HOME/source/dspace/modules/xmlui/src/main/webapp/themes
mkdir $HOME/source/dspace/modules/xmlui/src/main/webapp/themes/SUNScholar
cd $HOME/source/dspace-xmlui/src/main/webapp/themes
cp -R Mirage $HOME/source/dspace/modules/xmlui/src/main/webapp/themes/
cd $HOME/source/dspace/modules/xmlui/src/main/webapp/themes
mv Mirage SUNScholar
Step 2 - Modify the "xmlui.xconf" file to use "SUNScholar"
Type the following to go to your DSpace config directory.
cd $HOME/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="SUNScholar" regex=".*" path="SUNScholar/" />
- 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 "SUNScholar"
Type the following to change directory to the "SUNScholar" folder.
cd $HOME/source/dspace/modules/xmlui/src/main/webapp/themes/SUNScholar
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>SUNScholar</theme-path>
<theme-name>SUNScholar</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 "SUNScholar.xsl"
Type the following.
cd $HOME/source/dspace/modules/xmlui/src/main/webapp/themes/SUNScholar
Rename the "Mirage.xsl" file to "SUNScholar.xsl" by typing the following.
mv Mirage.xsl SUNScholar.xsl